10190 matches found
Oracle may be attacked if an attacker can pump the tokens for the entire block
Lines of code Vulnerability details Impact Attacker may use huge amount of their fund to pump the token in a liquidity pair for one entire block. The oracle will capture the manipulated price as current TWAP implementation may only cover 1 block if timed correctly. First block on every periodSize...
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...
Duplicate token can be added to MasterChef
Lines of code Vulnerability details Impact MasterChefV2.add does not check if the lpToken is previously added. This would lead to incorrect accounting of lpToken in different pid. Proof of Concept function adduint256 allocPoint, IERC20 lpToken, IRewarder rewarder public onlyOwner uint256...
Unnecessary migrate function
Lines of code Vulnerability details Impact There is no need to have a migrate function in zeroswap as there are no liquidity to vampire attack from. This function introduce a significant rug vector. Proof of Concept function migrateuint256 pid public requireaddressmigrator != address0,...
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...
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...
newProposal.executed automatically set to true
Lines of code Vulnerability details Impact Proposals might be falsely deemed as executed when in fact they have not been executed yet. Proof of Concept The queue function sets newProposal.executed = true even though that is not technically true. For the proposal to be executed it needs to be call...
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...
Base rate update frequency can be bypassed by an admin
Lines of code Vulnerability details Impact Base rate update frequency can be bypassed by an admin. Above function require updateFrequency blocks to be passed. Proof of Concept function updateBaseRateuint newBaseRatePerYear public // check the current block number uint blockNumber = block.number;...
Queued proposals cannot be executed in GovernorBravoDelegate.sol
Lines of code GovernorBravoDelegate.solL63 Vulnerability details Impact In GovernorBravoDelegate.sol's queue function, the executed value for the proposal to be queued is set to true. The execute function in GovernorBravoDelegate.sol will revert when called since the state of the proposal is...
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...
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...
zeroswap/UniswapV2Pair.sol Token reserves per lp token can be manipulated due to lack of MINIMUM_LIQUIDITY when minting the first liquidity with migrator
Lines of code Vulnerability details if totalSupply == 0 address migrator = IUniswapV2Factoryfactory.migrator; if msg.sender == migrator liquidity = IMigratormigrator.desiredLiquidity; requireliquidity 0 && liquidity != uint256-1, "Bad desired liquidity"; else requiremigrator == address0, "Must no...
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...
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...
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...
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...
_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...
Upgraded Q -> M from 225 [1655746069175]
Judge has assessed an item in Issue 225 as Medium risk. The relevant finding follows: C4-010 : The Dutch Auction Parameters Can be Manipulated By Owner After The Auction Started - LOW Impact - LOW Dutch Auction parameters can be changed by a malicious owner, after It is started. The malicious own...
Upgraded Q -> M from 225 [1655746320073]
Judge has assessed an item in Issue 225 as Medium risk. The relevant finding follows: C4-005 : Missing sanity check on the timestamps Impact During the code review, It has been observed that all timestamps are missing sanity checks. With the following scenario, that can have serious consequences...
Upgraded Q -> M from 44 [1655746452853]
Judge has assessed an item in Issue 44 as Medium risk. The relevant finding follows: 3. Missing/Invalid validation checks Risk Low Impact Function ForgottenRunesWarriorsMinter.setPhaseTimes setups times for different phases of minting. Phases should be launched one after the other. Missing check:...
Consistently check account balance before and after transfers for Fee-On-Transfer discrepancies
Lines of code Vulnerability details As arbitrary ERC20 tokens can be passed, the amount here should be calculated every time to take into consideration a possible fee-on-transfer or deflation. Also, it's a good practice for the future of the solution. Affected code:...
Accumulated ETH fees of InfinityExchange cannot be retrieved
Lines of code Vulnerability details ETH fees accumulated from takeOrders and takeMultipleOneOrders operations are permanently frozen within the contract as there is only one way designed to retrieve them, a rescueETH function, and it will work as intended, not being able to access ETH balance of...
Upgraded Q -> M from 36 [1655654413719]
Judge has assessed an item in Issue 36 as Medium risk. The relevant finding follows: Allows owner to mint more tokens than planned There are two ways for the owner of the contract to mint tokens for themselves unrelated to the public sale: through the teamSummon function or by setting the minter ...
Owner cannot transfer ETH balance of the exchange
Lines of code Vulnerability details User called takeOrders and takeMultipleOneOrders functions accumulate native token fees over time. These fees end up being frozen on the contract balance. There is only one way for an owner to transfer them, a rescueETH function, that isn’t able to access ETH...
Diamond upgrade proposition can be falsified
Lines of code Vulnerability details Impact Diamond is to be upgraded after a certain delay to give time to the community to verify changes made by the developers. If the proposition can be falsified, the contract admins can exploit the contract in any way of their choice. Proof of Concept To...
rescueEth does not transfer ether in contract
Lines of code Vulnerability details Impact The InfinityStakerrescueETH and InfinityExchangerescueETH payable functions sends msg.value to the destination and not the ether in the contract, so the fees and accidentally transferred ether is not sent to the destination address Proof of Concept...
Missing whenNotPaused modifier
Lines of code Vulnerability details Impact In StableSwapFacet.sol, two swapping functions contain the whenNotPaused modifier while swapExactOut and addSwapLiquidity do not. All functions to swap and add liquidity should contain the same modifiers to stop transactions while paused. Proof of Concep...
Routers Are Not Enforced To Repay AAVE Portal Loan
Lines of code Vulnerability details Background AAVE Portal AAVE portal provides a trusted credit line that allows bridges to take on an unbacked position, and Connext intents to use this credit line to provide fast-liquidity for its users in the event the routers do not have sufficient liquidity...
Relayer Will Not Receive Any Fee If execute Reverts
Lines of code Vulnerability details Proof-of-Concept Connext relies on the relayer to trigger the BridgeFacet.execute function on the destination domain to initiate the token transfer and calldata execution processes. Relayers pay for the gas cost to trigger the execute function, and in return fo...
Owner can grief with high gas units
Lines of code Vulnerability details Impact The owner of the InfinityExchange contract can frontrun sellers/buyers e.g InfinityExchange.matchOneToOneOrders, InfinityExchange.matchOneToManyOrders functions and set arbitrarily high gas units with updateWethTranferGas which can either cause an...
Admin can set arbitrarily high WETH_TRANSFER_GAS_UNITS which is a fee
Lines of code Vulnerability details Impact Users can lose their fund by attack from the admins Poc In the function updateWethTranferGasInfinityExchange.sol there is no limit for setting WETHTRANSFERGASUNITS . As this is a kind of fee paid by from the buyers to the contract By definition of the...
Did Not Approve To Zero First Causing Certain Token Transfer To Fail
Lines of code Vulnerability details Proof-of-Concept Some tokens like USDT do not work when changing the allowance from an existing non-zero allowance value. For example Tether USDT's approve function will revert if the current approval is not zero, to protect against front-running changes of...
diamondCut doesn't validate _init and _calldata
Lines of code Vulnerability details Malicious or compromised governance can send a different init and calldata payload than the one that was proposed. This is dangerous as they will be used for a delegatecall operation. An attacker can pretend to propose a safe upgrade and later execute a...
Executor and miner collusion and gas price
Lines of code Vulnerability details Impact The MATCHEXECUTOR can choose tx.gasprice and take the gas cost from a buyer. An executor can make a overly costly tx mined by a friendly miner and take extra profits. Proof of Concept and similar functions... Recommended Mitigation Steps There's no...
Overpaying ETH in InfinityExchange
Lines of code Vulnerability details Impact A user of the InfinityExchange contract can accidentally send more ETH than needed without the possibility to get the overpaid amount refunded. Proof of Concept if isMakerSeller && currency == address0 requiremsg.value = totalPrice, 'invalid total price'...
Protocol fee rate can be arbitrarily modified by the owner and the new rate will apply to all existing orders
Lines of code Vulnerability details function matchOneToOneOrders OrderTypes.MakerOrder calldata makerOrders1, OrderTypes.MakerOrder calldata makerOrders2 external uint256 startGas = gasleft; uint256 numMakerOrders = makerOrders1.length; requiremsg.sender == MATCHEXECUTOR, 'OME';...
ETH funds accidentally sent to InfinityStaker cannot be retrieved
Lines of code Vulnerability details rescueETH function that aims to retrieve mistakenly sent funds cannot reach contract balance, only sending over the Ether value attached to the current call instead. Setting the severity to medium as the case is a violation of system's auxiliary logic. Also, an...
Malicious Relayer Could Cause A Router To Provide More Liquidity Than It Should
Lines of code Vulnerability details Proof-of-Concept Assume this is a fast-transfer path and the sequencer has a good reason e.g. some sophisticated liquidity load balancing algorithm to assign 3 routers to provide liquidity for a transfer of 90 DAI Therefore, each of them will provide 30 DAI...
Router Owner Could Steal All The Funds Within SponsorVault
Lines of code Vulnerability details Proof-of-Concept Assume the following: For simplity sake, only two 2 routers exist within Connext. Gas, relayer, callback fees and slippage are ignored. An attacker owns Router A. Router A has 1,000,000 oUSDC on Optimism Domain/Chain Router B has only 100 oUSDC...
InfinityExchange owner can grief with high fees
Lines of code Vulnerability details Impact The owner of the InfinityExchange contract can set any high fee values for PROTOCOLFEEBPS via the InfinityExchange.setProtocolFee function. The fee value should be limited to a maximum of 10000. If set to higher values and due to the usage across functio...
In execute() the amount routers pay is what user signed, but in _reconcile() the amount routers get is what nomad sends and this two amount are not necessary equal because of slippage in original domain
Lines of code Vulnerability details Impact routers pay for transaction in destination domain then nomad messages come and routers get paid again. but the amount routers pay in execute are what transaction sender signed and the amount routers receive is what nomad sends and handles in reconcile bu...
Ether can get lock on functions takeMultipleOneOrders and takeOrders
Lines of code Vulnerability details Impact Ether send by the user cang gets locks when taking order/s Proof of Concept If Bob use function takeMultipleOneOrders or takeOrders to buy and sends more ETH that it supposes to remaing ETH will be lost, also if the seller is selling for other token and...
attacker can perform griefing for process() in PromiseRouter by reverting calls to callback() in callbackAddress
Lines of code Vulnerability details Impact process in PromiseRouter is used for process stored callback function and anyone calls it gets callbackFee and it calls callback function of callbackAddress. but attacker set a callbackAddress that reverts on callback and cause process caller griefing...
AssetLogic's _swapAssetOut can fail on the one step approval
Lines of code Vulnerability details swapAssetOut performs one step approval for an arbitrary assetIn before calling pool's swapExactOut. As ERC20 that do not allow approval race condition prohibit setting approval to a new positive value when allowance is positive already, this call will fail if...
Incorrect accounting results in loss of user stake
Lines of code InfinityStaker.solL116-L131 InfinityStaker.solL290-L325 Vulnerability details Impact In InfinityStaker.sol, when calling the unstake function updateUserStakedAmounts is called to readjust the user staked amounts. If a user stakes an amount in a duration and has an already vested amo...
_transferNFTs can end up transferring nothing
Lines of code Vulnerability details Malicious maker can list an NFT that conforms to ERC-165, but reports that it's neither ERC721, nor ERC1155, i.e. both supportsInterface0x80ac58cd and supportsInterface0xd9b67a26 are false. In all other regards it can be fully valid NFT, for example having...
Incorrect calculation of startGasPerOrder will cause fund loss to the buyer of the last order due to mischarged gas cost
Lines of code Vulnerability details uint256 gasCost = startGasPerOrder - gasleft + wethTransferGasUnits tx.gasprice; When the orders are matched by the MATCHEXECUTOR, the gas cost of each order is paid by the buyer in WETH, the amount gasCost is calculated based on startGasPerOrder, gasleft and...
The timestamp of the specified duration is reset after the position is added via stake().
Lines of code Vulnerability details Impact Detailed description of the impact of this finding. I noticed that the stake amount change in stake is +=, which means that the project itself defaults to adding positions at the same duration, but the timestamp of the duration is overwritten by =...