10190 matches found
Ineffective TWAV Implementation
Lines of code Vulnerability details Background The current TWAV implementation consists of an array of 4 observations/valuations called twavObservations. Whenever, the new valuation is updated, the new cumulative valuation will be appended to the twavObservations array and the oldest...
Missing notBoughtOut modifier
Lines of code Vulnerability details Impact On the withdrawUnsettledBids function, unsettledBid can be withdraw when buyout is rejected. However, the contract is missing notBoughtOut modifier in the function. From that reason, during buyout period the function can be called. On the redeem function...
_secondaryReserveRatio is likely to be overflowed due to an unsafe downcast
Lines of code Vulnerability details msg.value SCALE 1e18 / initialTokenSupply initialTokenPrice is likely to be more than maxuint32, and therefore secondaryReserveRatio can be overflowed due to the unsafe downcast to uint32. For example, for: initialTokenSupply = 1e20. initialTokenPrice = 1e14. T...
Basket NFT have no name and symbol
Lines of code Vulnerability details Impact The Basket contract is intended to be used behind a proxy. But the ERC721 implementation used is not upgradeable, and its constructor is called at deployment time on the implementation. So all proxies will have a void name and symbol, breaking all...
[PNM-005] Reentrancy of function sell
Lines of code Vulnerability details Description In function chargeFee, a potential reetrancy can be triggered by the factory. Since function sell invokes chargeFee in the middle of its function body, it potentially impacts the calculation, e.g., the totalSupply would be incorrect since the tokens...
Potential denial of service issues
Lines of code Vulnerability details Impact Detailed description of the impact of this finding. I noticed that the withdrawUnsettledBids and redeem functions return the Ether amount by calling safeTransferETH, but if the to address passed in is a malicious contract address and the receive function...
_updateTwav() and _getTwav() will revert when cumulativePrice overflows
Lines of code Vulnerability details Impact Contract will break when cumulativeValuation overflows. PoC Cumulative prices are designed to work with overflows/underflows because in the end the difference is important. In updateTwav when prevCumulativeValuation + valuation timeElapsed overflows the...
TWAV can be attacked by flash loan
Lines of code Vulnerability details Impact updateTWAV can be flash loaned. Hacker may pay the flash loan fee for 4 blocks then execute the attack after that. Proof of Concept function updateTWAVuint256 valuation, uint32 blockTimestamp internal uint32 timeElapsed; unchecked timeElapsed =...
Reentrancy bug in Basket's withdraw multiple tokens function which gives attacker ability to transfer basket ownership and spend it but withdraw all the tokens out of basket
Lines of code Vulnerability details Impact Basket is used for keep multiple tokens in contract and mint one NFT token to represent their ownership. Basket only allows for owner of NFTid=0 to withdraw tokens from Basket address. users can deposit multiple tokens in one Basket and then create a...
DoS with block gas limit--External calls inside a loop might lead to a denial-of-service attack.
Lines of code Vulnerability details Impact --Check: calls-loop --Severity: Medium --Confidence: Medium External calls can fail accidentally or deliberately, which can cause a DoS condition in the contract. Proof of Concept -- --ConsenSys Smart Contract Best Practices -- -- Tools Used...
TWAP array can be artificially filled up with the most recent quote
Lines of code Vulnerability details A malicious user can run updateTWAV on each block, quickly replacing all four values of the twavObservations array with the most recent valuation. I.e. the time weighted averaging essence of the recorded price can be directly reduced to always be just most rece...
attacker can give a smaller amount of tokens and not pay the fees
Lines of code Vulnerability details Impact an attacker can specify an amount like from 1 wei or more but depends on the state of the contract variables. amount= 1 adminfee=5 / 1000000 = 0 because of persion loss whichfeeAdmin=0 same thing for the other fees and there is no check that they cant be...
Upgraded Q -> H from 94 [1655957384739]
Judge has assessed an item in Issue 94 as High risk. The relevant finding follows: 2. Return values of transfer/transferFrom not checked Not all IERC20 implementations revert when there's a failure in transfer/transferFrom. The function signature has a boolean return value and they indicate error...
Upgraded Q -> H from 285 [1655952312863]
Judge has assessed an item in Issue 285 as High risk. The relevant finding follows: 1. Excess ether sent to FixedPricePassThruGate is lost low passThruGate redirects to a beneficiary only gate.ethCost, requiring that msg.value = gate.ethCost. As there are no other ways to access native tokens hel...
missed valid address check for assetAddress
Lines of code Vulnerability details Impact Malicious Actor can do DoS using Reentrance using createVault and can create vault without depositing any asset Proof of Concept pragma solidity ^0.8.10; import "./NibblVaultFactory.sol"; contract ERC721Attack address curator =...
whenNotPaused modifier missing
Lines of code Vulnerability details Impact whenNotPaused modifier is missing in both createBasket function NibblVaultFactory.solL80 and withdrawUnsettledBids function NibblVault.solL424 This means even when contract is in paused state this function will still be operational Note Other impacted...
ERC1155 support unchecked - NFT can be lost
Lines of code Vulnerability details Impact It is not checked whether withdrawn token supports ERC1155 interface. Also there is no check to see if necessary approval have been set for sending nft The fix need to be applied for all other functions withdrawing ERC1155 Proof of Concept 1. Observe the...
ERC721 support not checked - NFT loss
Lines of code Vulnerability details Impact It is not checked whether withdrawn token supports ERC721 interface. Also there is no check to see if necessary approval have been set for sending nft The fix need to be applied for all other functions withdrawing ERC721 Proof of Concept 1. Observe the...
Some users can redeem more reserve tokens after curator redeems accumulated curator fee.
Lines of code Vulnerability details Impact It is possible for some users to redeem more reserved tokens if the curator redeems accummulated curator fee before their redeem action in the case of a boughtOut. This is possible because NibblVault.redeemCuratorFee sets feeAccruedCurator back to 0. So ...
Transition notBoughtOut -> boughtOut -> notBoughtOut possible because of updateTWAV
Lines of code Vulnerability details Impact Because rejectBuyout uses the TWAV, which is time-weighted and updateTWAV can be called, it is possible that notBoughtOut is true at first, then boughtOut is true, and then notBoughtOut is true again. See Proof of Concept for how one can construct such a...
use ECDSA helper library instead of ecrecover
Lines of code Vulnerability details use ECDSA helper library instead of ecrecover the function permit adds approval for a spender for a certain amount of value use of ecrecover to validate signatures without a nonce will allow signatures to be replayed to add additional approvals due to signature...
initiateBuyout and sell functions on NibbleVault.sol Reentrancy vulnerability
Lines of code Vulnerability details Impact 1. In NibbleVault.sol, it is possible for a contract to prevent the Sell event from being fired after being sent ether. From calling the sell function on line 390, an attacker contract is able to keep the event hidden from being listened to by stopping t...
Transferring any amount of the underlying token to the CNote contract will make the contract functions unusable
Lines of code Vulnerability details Impact The contract expects the balance of the underlying token to == 0 at all points when calling the contract functions by requiring getCashPrior == 0, which checks token.balanceOfaddressthis where token is the underlying asset. An attacker can transfer any...
WETH#approve can be used to steal user balances
Lines of code Vulnerability details Impact In WETH.sol 2nd approve function can be used to update allowance of any user, it can be used to steal users balance Proof of Concept function approveaddress owner, address spender external returnsbool approveowner, spender, balanceOfowner; return true;...
Attacker can transfer himself tokens and deplete token0 and token 1 out of funds
Lines of code Vulnerability details Impact Attacker can transfer himself tokens and deplete token0 and token 1 out of funds And there is no check for how much tokens attacker has so attacker Supplies amount0out and amount1out huge number not checked and it gets transferred to the attacker and...
_update function on deployment time isnt actually going to be 30 minutes and you can bypass it
Lines of code Vulnerability details Because timeElapsed = blocktimestamp , on deployment block.timestamp -point.timestamp it can be zero if some calls it right after deployment And block.timestamp 1800 which is true even though its not a pass 30 minutes mitigation have check that updated...
repayAmountFinal is not considered while calculating actualRepayAmount while calling doTransferIn(payer, repayAmount)
Lines of code Vulnerability details Impact repayAmountFinal is not used inside repayBorrowFresh The computation for actualRepayAmount doesnot account for repayAmountFinal in L111. Proof of Concept function repayBorrowFreshaddress payer, address borrower, uint repayAmount internal override...
Stack too deep error within BaseV1-periphery.sol
Lines of code BaseV1-periphery.sol lines 323-341 Vulnerability details Impact Stack too deep error when using remove liquidity function, fixing issue allows for avoiding using optimizations thus increases the periphery contract's longevity/scalability. Proof of Concept function...
Functions in CNote.sol are internal instead of external/public
Lines of code Vulnerability details Impact Most of the functions in CNote.sol are internal mutability and have no other locations they are being called. This renders most of the functionalities in the contract to be uncallable. Tools Used Manual review Recommended Mitigation Steps Change to the...
Missing zero address check can set treasury to zero address
Lines of code Vulnerability details Impact AccountantDelegate.initialize is missing a zero address check for treasury parameter, which could may allow treasury to be mistakenly set to 0 address. Proof of Concept Tools Used Manual review Recommended Mitigation Steps Add a require check for zero...
Attackers can call update and grief the users from swapping tokens
Lines of code Vulnerability details Impact Attackers can call update and grief the users from swapping tokens An attacker can specify reserve0 and revsere1 in update function and make it very small number and the user will have to supply zero tokens otherwise the function will fail. mitigation :...
In Note.sol, anyone can become the accountant and mint all the tokens to themselves
Lines of code Vulnerability details Impact Affected code: The function minttoAccountant is supposed to be called after contract initialization, so that the accountant is immediately set and all the tokens are mint to them. However, this function completely lacks any access control itβs just...
CNote: Attacker can frontrun the calling of _setAccountantContract and gain admin priviledges and insert a malicious accountant contract
Lines of code Vulnerability details Impact The function does not have access control before the accountant address is set, allowing anyone to call the function, gain admin privileges, and set the accountant address. Proof of Concept CNote.solL17 Recommended Mitigation Steps Include access control...
Note: When _initialSupply ! = 0, the _mint_to_Accountant function will fail
Lines of code Vulnerability details Impact In Note contract, if initialSupply ! = 0, totalSupply will overflow when the minttoAccountant function executes mintmsg.sender, typeuint.max constructorstring memory name, string memory symbol, uint256 totalSupply public name = name; symbol = symbol;...
CNote updates the accounts after sending the funds, allowing for reentrancy
Lines of code Vulnerability details Having no reentrancy control and updating the records after external interactions allows for funds draining by reentrancy. Setting the severity to medium as this is conditional to transfer flow control introduction on future upgrades, but the impact is up to th...
A queued proposal will never be executed
Lines of code Vulnerability details All the relevant fields for a proposal is set in queue but executed is marked as true, even before the proposal is even queued. When it comes time to execute a proposal, this will be impossible since state will always return ProposalState.Executed. The conditio...
attacker steals funds from the weth contract
Lines of code Vulnerability details attacker steals funds from the weth contract 1.Attacker has balance of 1 weth 2.Attacker calls withdraw with 1 weth 3.Transfer is called to fallback function in attacker contract 4.Attacker Fallback function sends 1 ether to the weth fallback function 5. It...
newblockchain report: Missing access control in Proposal-Store.sol
Lines of code Vulnerability details Impact Anyone can add proposal. These proposals are used later to be executed by timelock in GovernorBravoDelegate. However, it is unclear whether the code works as intended: see the QA report "Upon queue executed true in GovernorBravoDelegate". Possible...
Attacker can steal all tokens from pools
Lines of code Vulnerability details Attacker can steal all tokens from pool 2 issues 1.On deployment totalsupply is zero and reserve0 and reserve1 is zero called minting 103 to address zero And if tokens have supply in them amount0=1018 amount1=1018 liquidity= sqr1e36 - 103 =1015 which is still...
CNote balance can be affected by griefing attack
Lines of code Vulnerability details Functions borrowFresh, repayBorrowFresh, mintFresh, redeemFresh require CNote balance to be strictly zero, reverting unconditionally otherwise. However, as CNote is ERC20 with usual transfer functionality, anyone can send a cNote tokens to the contract itself,...
Incorrect hard coded value for WETH address
Lines of code Vulnerability details Impact getWETHAddress still relies on same Comp hard coded address. Unless WETH address is deployed to an address identical to Comps original address the grantCompinternal function wont work or in a pessimistic scenario an attacker might deploy a malicious toke...
WETH.totalSupply() returns wrong result.
Lines of code Vulnerability details Impact WETH.totalSupply returns wrong result. I can't find other contracts that use this function but WETH.sol is a base contract and it should be fixed properly. Proof of Concept WETH.balanceOf just returns a balance of a specific address and totalSupply must ...
getWETHAddress() returns wrong address
Lines of code Vulnerability details Impact The hardcoded return value is the address of COMP token in mainnet not of WETH in getWETHAddress. grantCompInternal function depends on this return value which will cause unintended issues. Proof of Concept function grantCompInternaladdress user, uint...
In CNote.sol, an attacker can DOS the money lending/debt repay functionalities for everybody
Lines of code Vulnerability details Impact Affected code: https://github.com/Plex-Engineer/lending-market/blob/ab31a612be354e252...
Poor random used in NoteInterest
Lines of code Vulnerability details Impact The random number used in NoteInterest.getBorrowRate is easily bruteforceable by an attacker to generate the address that give the lowest interest rate. Proof of Concept uint rand = uintkeccak256abi.encodePackedmsg.sender % 100; uint ir = 100 -...
WETH.sol computes the wrong totalSupply()
Lines of code Vulnerability details Impact Affected code: WETH.sol is almost copied from the infamous WETH contract that lives in mainnet. This contract is supposed to receive the native currency of the blockchain for example ETH and wrap it into a tokenized, ERC-20 form. This contract computes t...
MasterChef's emergencyWithdraw can be reentered drawing all lptokens from the contract if pool.lpToken allows for transfer flow control
Lines of code Vulnerability details User's LP funds accounting update in emergencyWithdraw happens after lpToken transfer. If pool.lpToken allows for the control of transfer call flow or can be upgraded to allow it in the future i.e. beforetokentransfer, afterTokenTransfer type of hooks, or an...
Block.timestamp is always growing in epoch seconds and observation.timestamp needs to be called is its very unlikely to for it to be equal each other Bypassing
Lines of code Vulnerability details Block.timestamp is always growing in epoch seconds and observation.timestamp needs to be called is its very unlikely to for it to be equal each other Bypassing observation and gets it to be wrong length which could cause logic brakes and worse because your not...
No check of return value token transfer
Lines of code Vulnerability details Impact transfer does not check the return , due which transfer may get failed without reverting Proof of Concept Tools Used manual review Recommended Mitigation Steps add checks the for the return value from transfer --- The text was updated successfully, but...
In Cnote.sol, anyone can initially become both accountant and admin
Lines of code Vulnerability details Impact Affected code: The function setAccountantContract is supposed to be called after contract initialization, so that the accountant is immediately set. However, this function completely lacks any access control itβs just public so an attacker can monitor th...