Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2022/06/21 12:0 a.m.6 views

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;...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.7 views

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 -...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.10 views

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...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.6 views

Anyone can execute a proposal

Lines of code Vulnerability details Impact Anyone can call execute and pass in a malicious proposal. Proof of Concept There is no access control for the execute function. Tools Used Manual Review. Recommended Mitigation Steps Implement access control to execute. --- The text was updated...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.6 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.7 views

No checks for the input of borrow cap

Lines of code Vulnerability details Impact due to lack of input validation of borrowcap , it can be borrowcap for a ctoken can be 0 and value of 0 corresponds to unlimited borrowing Proof of Concept Tools Used manual reveiw Recommended Mitigation Steps add input validation while using it in loop...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.4 views

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...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.10 views

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;...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.6 views

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...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.8 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.7 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.6 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.7 views

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...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.9 views

getCashPrior == 0 not checked at the end of redeemFresh

Lines of code CNote.solL332 Vulnerability details Impact To ensure that there are no Note tokens in CNote.sol the getCashPrior value should be exactly 0 at the end of every function that transfers tokens in and out of the contract. In the redeemFresh function, the getCashPior value is not checked...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.13 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.5 views

Redeem function can silently fail

Lines of code Vulnerability details Impact During the code review, It has been observed that return value of redeem function is not checked. Redeem operation can silently fail and the protocol can expect It is successfully executed. From compound, the comment can be seen from below. CErc20 / CEth...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.6 views

first user can steal everyone else's tokens

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. A user who joins the systems first stakes first can steal everybody's tokens by sending tokens to the system externally. This attack is possible because you enable staking a small amount of tokens. Proo...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.9 views

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...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.6 views

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...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/20 12:0 a.m.10 views

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:...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/20 12:0 a.m.6 views

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...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/06/20 12:0 a.m.7 views

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...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.6 views

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 ...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.11 views

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';...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.11 views

_handleExecuteTransaction may not working correctly on fee-on-transfer tokens. Moreover, if it is failed, fund may be locked forever.

Lines of code Vulnerability details Impact handleExecuteTransaction may not working correctly on fee-on-transfer tokens. As duplicated fee is applied to fee on transfer token when executing a arbitrary call message passing request. Moreover, the Executor contract increase allowance on that token...

7.4AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.12 views

ETH rescue does not work

Lines of code Vulnerability details Impact Both contracts InfinityExchange and InfinityStaker have a function rescueETH to allow an admin to rescue any ETH accidentally sent to the contracts. However, this ETH rescue functionality does not work. The code expects ETH to be sent to this function an...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.12 views

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...

6.3AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.7 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.9 views

routerBalances[msg.sender][_local] can be inflated in repayAavePortal due to underflow in unchecked math

Lines of code Vulnerability details function repayAavePortal address local, uint256 backingAmount, uint256 feeAmount, uint256 maxIn, bytes32 transferId external uint256 totalAmount = backingAmount + feeAmount; // in adopted uint256 routerBalance = s.routerBalancesmsg.senderlocal; // in local //...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.12 views

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...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.10 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.16 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.8 views

Extra msg.value in takeOrders

Lines of code Vulnerability details Impact In takeOrders, msg.sender can pay the items in ether or other native coins. // check to ensure that for ETH orders, enough ETH is sent // for non ETH orders, IERC20 safeTransferFrom will throw error if insufficient amount is sent if isMakerSeller &&...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.8 views

Taker can provide several instances of the cheapest ERC-1155 item in a multi item bundle

Lines of code Vulnerability details Maker bid for a bundle of ERC-1155 items can be tricked into successful execution by providing several instances of the cheapest item instead of the required bundle. This way a malicious taker can receive full maker's price, providing several instances of the...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.11 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.9 views

Rescue ETH at InfinityExchange.sol is incorrectly implemented

Lines of code Vulnerability details Impact Admins are unable to recover any ETH locked in the contract PoC The function rescueETHInfinityExchange.sol is incorrectly implemented. It is using msg.value instead of the balance of the contract function rescueETHaddress destination external payable...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.9 views

Current implementation of arbitrary call execute failure handler may break some use case for example NFT bridge.

Lines of code Vulnerability details Impact Current implementation of arbitrary call execute failure handler may break some use case for example NFT Bridge. In the case of NFT Bridge, NFT may be lost forever. This is likely to be happened in the case of out of gas. Proof of Concept Relayer receive...

7.4AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.15 views

User can accidentally permanently freeze the staked funds

Lines of code Vulnerability details User facing changeDuration function allows for setting any newDuration of a stake. However, only THREEMONTHS, SIXMONTHS and TWELVEMONTHS durations are visible to the system in all the subsequent logic. If a user accidentally sets any other duration, the...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.11 views

Bridging could be temporarily disrupted when setConnext is called without deactivating sponsorVault

Lines of code Vulnerability details When a sponsor wants to stop sponsoring bridge fees, it's possible that they call SponsorVault.setConnext to stop allowing Connext to reimburse fees, but forgot to inform the Connext team. This will cause bridging executions to be temporarily disrupted. For fee...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.9 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.8 views

Incorrect check in diamondCut allows update be executed without proposal

Lines of code Vulnerability details The current implementation of LibDiamond.diamondCut allows any diamondCut update to be executed instantly, defeating the purpose of the 7 day update delay mechanism. The issue is this check in LibDiamond.diamondCut: require...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.9 views

Precision Loss During Division

Lines of code Vulnerability details Proof-of-Concept Assume that toSwap = 10 DAI and pathLen = 3 in this example. Therefore, the bridge will pull 10 DAI from the RouterFacet contract. However, within the BridgeFacet.handleExecuteLiquidity function, due to precision loss when solidity handles...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.8 views

Malicious Relayers Could Favor Their Routers

Lines of code Vulnerability details Vulnerability Details Assume that a malicious relayer operates a router in Connext providing fast-liquidity service. A malicious relayer could always swap the routers within the execute calldata with the routers owned by malicious relayer, and submit it to the...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.9 views

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...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.6 views

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 =...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.22 views

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...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.4 views

Wrong implementation of rescueETH, causing the fees in native tokens to be frozen in the contract

Lines of code Vulnerability details /// @dev used for rescuing exchange fees paid to the contract in ETH function rescueETHaddress destination external payable onlyOwner bool sent, = destination.callvalue: msg.value''; requiresent, 'failed'; Recommendation Change to: /// @dev used for rescuing...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.10 views

BridgeFacet's _executePortalTransfer ignores underlying token amount withdrawn from Aave pool

Lines of code Vulnerability details executePortalTransfer can introduce underlying token deficit by accounting for full underlying amount received from Aave unconditionally on what was actually withdrawn from Aave pool. Actual amount withdrawn is returned by IAavePools.aavePool.withdraw, but...

6.5AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.15 views

Malicious Relayer Can Replay Execute Calldata On Different Chains Causing Double-Spend Issue

Lines of code Vulnerability details Proof-of-Concept This issue is only applicable for fast-transfer. Slow transfer would not have this issue because of the built-in fraud-proof mechanism in Nomad. First, the attacker will attempt to use Connext to send 1000 USDC from Ethereum domain to Optimism...

6.5AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.6 views

_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...

6.8AI score
Exploits0
Total number of security vulnerabilities10190