Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
added 2023/04/03 12:0 a.m.24 views

Logic for RescueTokens is incorrect for muteTokens

Lines of code Vulnerability details Proof of Concept The logic for RescueTokens doesn't take into account the reward remainders. I wanted to write a POC but I'm in a bit of a time crunch. So, imagine the following situation: totalRewards = 100, and staker A, B the only stakers staked for the firs...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.24 views

The Risk of Adding an Incorrect Previous Block Hash Value in a Blockchain Network

Lines of code Vulnerability details Impact There is a risk of adding an incorrect previous block hash value to a block, either intentionally or unintentionally. If the previous block hash value is incorrect, it means that the data in the previous block has been tampered with, and the current bloc...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/01/19 12:0 a.m.24 views

FIRST ERC4626 DEPOSIT CAN BE EXPLOITED ON SHARE CALCULATION

Lines of code Vulnerability details Impact This is a common attack vector involving shares based liquidity pool contracts. An early user can manipulate the price per share and profit from late users' deposits because of the precision loss caused by the rather large value of price per share. Note:...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/01/03 12:0 a.m.24 views

EXTERNAL CALL TO UNTRUSTED PARTIES

Lines of code Vulnerability details Impact Functions in this contract or inherited functions can be reentered. Proof of Concept In Vault.sol the withdrawAVAX and redeemAVAX functions make an external call to the msg.sender by way of safeTransferETH. This allows the caller to reenter this and othe...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/25 12:0 a.m.24 views

xERC4626.sol#beforeWithdraw will fail under certain conditions

Lines of code Vulnerability details Impact Valid withdrawals will fail in certain edge cases Proof of Concept function totalAssets public view override returns uint256 // cache global vars uint256 storedTotalAssets = storedTotalAssets; uint192 lastRewardAmount = lastRewardAmount; uint32...

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

Unchecked Transfer

Lines of code Vulnerability details High Severity - Unchecked Transfer Line 167 of Vault.sol has an unchecked Transfer. Reference and recommendation from slither. Tools Used: Slither --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.24 views

Chainlink oracle lacks proper validation

Lines of code Vulnerability details Impact Calls to the Chainlink price oracle via latestRoundData in FraxlendPairCore.sol use the correct function latestRoundData per Chainlink's documentation, but lack the recommended validations to ensure that the round is complete and does not return stale...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/05/08 12:0 a.m.24 views

PermissionlessBasicPoolFactory\addPool() doesn’t check whether pool.excessBeneficiary is address(0)

Lines of code Vulnerability details Impact In PermissionlessBasicPoolFactory\addPool, it doesn’t check whether pool.excessBeneficiary is address0. Therefore, when doing withdrawExcessRewards. IERC20pool.rewardTokensi.transferpool.excessBeneficiary, rewards always revert. Proof of Concept...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/13 12:0 a.m.24 views

Deprecated CHAINLINK API usage

Lines of code Vulnerability details Impact Usage of deprecated chainlink function to get collateral price. Proof of Concept The Chainlink API latestAnswer used in the FungibleAssetVaultForDAO contract is deprecated: This method returns the last value but that value cannot be fully updated. New V3...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/03/02 12:0 a.m.24 views

EIP-712 signatures can be re-used in private sales

Lines of code Vulnerability details Impact Within a NFTMarketPrivateSale contract, buyers are allowed to purchase a seller's NFT. This is done through a seller providing a buyer a EIP-712 signature. The buyer can then call buyFromPrivateSaleFor providing the v, r, and s values of the signature as...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/01/30 12:0 a.m.24 views

ConvexStakingWrapper does not update rewards state before transferring tokens

Handle kenzo Vulnerability details ConvexStakingWrapper saves data for reward calculation in dedicated variables for each user, such as reward.rewardintegralforaccount. These variables are not updated when transferring wrapped staked tokens. Please note that Convex's original ConvexStakingWrapper...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/12/19 12:0 a.m.24 views

Frontrunning attack via swap token functionality

Handle thankyou Vulnerability details Impact Amun utilizes both Pangolin and Uniswap's Routers to swap tokens within a given pair. One of the router functions used by Amun is swapExactTokensForTokens. Amun provides this function several arguments that the Router contract then utilizes to commence...

7.4AI score
Exploits0
Code423n4
Code423n4
added 2021/10/18 12:0 a.m.24 views

Incorrect checking of signature length

Handle JMukesh Vulnerability details Impact signature which have SignatureMode.EthSign/SignatureMode.EIP712 have length 65 , so all signature coming through both mode will be reverted Proof of Concept Tools Used manual review Recommended Mitigation Steps update the correct signature length --- Th...

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

return value of 0 from ecrecover not checked

Handle gpersoon Vulnerability details Impact The solidity function ecrecover is used, however the error result of 0 is not checked for. See documentation: "recover the address associated with the public key from elliptic curve signature or return zero on error. " Now you can supply invalid input...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2024/01/08 12:0 a.m.23 views

CM can exploit a pause in GuardCM to gain permanent unrestricted access

Lines of code Vulnerability details Impact The GuardCM contract is designed to restrict the Community Multisig CM actions within the protocol to only specific contracts and methods. Under specific circumstances, the protocol allows the guard to be paused, which temporarily pauses the guard and...

7.4AI score
Exploits0
Code423n4
Code423n4
added 2023/12/21 12:0 a.m.23 views

liquidator will always take what is left of borrowers premium

Lines of code Vulnerability details Impact A liquidator can manipulate the pool they are swapping in to take any potential left over premium from the borrower. Proof of Concept When liquidating a position the liquidator essentially closes the position on behalf of the borrower for a liquidation...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/10/25 12:0 a.m.23 views

Updating safeManager reference in Vault721 will brick transfer of safes

Lines of code Vulnerability details Impact Updating safeManager reference in Vault721 will brick safe transfers since the state of the new ODSafeManager instance won't have corresponding data. In addition, it is not clear how it would be possible to achieve seamless migration as particular...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/28 12:0 a.m.23 views

_reserveTokenSpecified does not check if price is in allowed range

Lines of code Vulnerability details Impact Price could go out of range Proof of Concept EvolvingProteus defines a price range using 2 constants, MAXM and MINM: int128 constant MAXM = 0x5f5e1000000000000000000; int128 constant MINM = 0x00000000000002af31dc461; These constants are used in...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.23 views

A malicious deployer can set auctionTargetTime close to auctionDuration to make it hard or impossible for anyone to win a reward.

Lines of code Vulnerability details Impact A malicious deployer could set auctionTargetTime very close to auctionDuration, making it hard/impossible for anyone to win a reward leading to losses Proof of Concept In the constructor, auctionTargetTime is not validated to be less than auctionDuration...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/07/10 12:0 a.m.23 views

A malicious user can steal a reserved token by using shift() function of Well.sol if the well was added liquidity unsafely with zero amount of the one of tokens.

Lines of code Vulnerability details Impact A malicious user can steal a reserved token by using shift function of Well.sol if the well was added liquidity unsafely with zero amount of the one of tokens. Proof of Concept Let's assume the well with WETH and USDC tokens. Currently totalSupply is zer...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/07/05 12:0 a.m.23 views

Bad accounting on ERC4626MultiToken.sol leads to user funds stuck in the contract

Lines of code Vulnerability details Summary Bad accounting on ERC4626MultiToken.sol leads to user funds stuck in the contract on deposit and withdraw logic. Vulnerability Detail The UlyssesToken unified liquidity tokens are derived from ERC4626Multitoken. This is an standard tokenized vault with...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/06/09 12:0 a.m.23 views

depositERC20To() and withdrawTo() is missing onlyEOA() modifier - Leading to loss of user funds

Lines of code Vulnerability details Impact StandardBridge.sol contract has a modifier called onlyEOA. The comment says 132 / 133 @notice Only allow EOAs to call the functions. Note that this is not safe against contracts 134 calling code within their constructors, but also doesn't really matter...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/06/09 12:0 a.m.23 views

Lack of reentrancy protection in L1ERC721Bridge.sol

Lines of code Vulnerability details Summary Calling IERC721.transferFrom in the L1ERC721Bridge.initiateBridgeERC721 after writing the deposit makes a reentrancy attack possible if there is a callback before transfer in the localToken contract we will name such a contract ERC721Callback...

6.5AI score
Exploits0
Code423n4
Code423n4
added 2023/06/09 12:0 a.m.23 views

Technically the seven days period is not guaranteed and it's possible for the challenger to delete a withdrawal even if it hasn't been challenged during the seven days

Lines of code Vulnerability details Proof of Concept There's an existing logic to prevent the CHALLENGER from deleting a l2Output after the finalization period has ended. This is done to prevent having user withdrawals blocked after the finalization period has elapsed without challenges. The...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/05/30 12:0 a.m.23 views

Reentrancy guard in rageQuit() can be bypassed

Lines of code Vulnerability details Reentrancy guard in rageQuit can be bypassed The reentrancy guard present in the rageQuit function can be bypassed by host accounts, leading to reentrancy attack vectors and loss of funds. Impact The new rageQuit function can be used by party members to exit...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/05/11 12:0 a.m.23 views

Using memory instead of storage in 'redeemPositions' will result in incorrect LP Balance

Lines of code Vulnerability details Impact This bug could lead to a situation where a user can 'redeem' their positions without the associated liquidity positions LPs being properly reset. This could result in the user being able to artificially inflate their LP balance, which could lead to...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.23 views

[Medium - 1] Ecrecover precompile doesn't behave the same as the one from Ethereum

Lines of code Vulnerability details Impact According to the Ethereum yellow paper and in the specifications of the ecrecover precompile, it is stated that if the ecrecover doesn't return anything denoted by ∅, then the return should be 0 as well. If we take a look at the current ecrecover...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/02/07 12:0 a.m.23 views

Re-entrancy in MultiRewardStaking.claimRewards

Lines of code Vulnerability details Impact If an ERC-777 token is used as reward token for any Staking contract in the system, that reward token can be completely drained from the Staking contract. Proof of Concept Re-entrancy can be done in the MultiRewardStaking.claimRewards function because of...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/01/28 12:0 a.m.23 views

Only one GroupBuy can ever use USDT or similar tokens with front-running approval protections

Lines of code Vulnerability details The issue that is described in code-423n4/2022-12-tessera-findings37 was not mitigated and still applies like it is described there. --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/01/19 12:0 a.m.23 views

First ERC4626 deposit can break share calculation

Lines of code Vulnerability details Impact ERC4626 vault share price can be maliciously inflated on the initial deposit, leading to the next depositor losing assets due to precision issues. Proof of Concept The first depositor of an ERC4626 vault can maliciously manipulate the share price by...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.23 views

Discrepency in the Uniswap V3 position price calculation because of decimals

Lines of code Vulnerability details Impact When the squared root of the Uniswap V3 position is calculated from the getOracleData function, the price may return a very high number in the case that the token1 decimals are strictly superior to the token0 decimals. See: The reason is that at the...

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

Validator can revert block at no cost.

Lines of code Vulnerability details Impact Validator can revert block at no cost. Proof of Concept the validator should only call this function on Executor.sol to revert the unexecuted blocks if the block is not really not executable. /// @notice Reverts unexecuted blocks /// @param newLastBlock...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/10/23 12:0 a.m.23 views

LBPair swap() can be front-runned, a malicious attacker can call swap with higher gas than a user, getting the user swap amount transferred to the attacker address

Lines of code Vulnerability details Impact In the LBPair.sol contract, when a user calls swap after transferring tokens to the Pair, a malicious attacker can front-run that tx then call swap on the same pair with the parameter to changed to an malicious address of his choice, paying a higher gass...

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

Frontrunning initialize to negatively affect first liquidity provider possible

Lines of code Vulnerability details Impact The initialize-function of an AlgebraPool can be frontrun to set an arbitrary initial price. This will negatively affect the first person to add liquidity to the pool. Proof of Concept There are no restrictions on the AlgebraPool.initializeprice function...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/10/01 12:0 a.m.23 views

Attackers can prevent the creation of pools

Lines of code Vulnerability details Impact A malicious attacker can permanently prevent users from creating pools of certain token pairs. Proof of Concept The deploy function in AlgebraPoolDeployer.sol uses a salt while deploying a new AlgebraPool: 44: function deploy 45: address dataStorage, 46:...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.23 views

Rounding error for low decimal token

Lines of code Vulnerability details Impact Some token has low decimal USDC has only 6, as a result, the rounding may introduce substantial error in stable pair calculation, causing wrong getAmountOut quote, at the end lead to fund loss in swap function. Malicious user can abuse the wrong quote to...

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

Multicall does not check if the owner has changed after calls has been made(msg.sender misuse)

Lines of code Vulnerability details Impact The multicall doesn't check if the owner has changed after call or calls has been made. The transferOwnerShip contracts/proxy/MIMOProxy.sol/ requires that the owner is the msg.sender, before ownership can be changes, which is exactly what multicall can d...

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

WETH.allowance() returns wrong result.

Lines of code Vulnerability details Impact WETH.allowance 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 In this function, the "return" keyword is missing and it will always output 0 in th...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/05/30 12:0 a.m.23 views

Bribe Rewards Struck In Contract If Deposited During First Epoch

Lines of code Vulnerability details Vulnerability Details Bribe rewards added to the Bribe contract in the first epoch will not be claimable by any voters, and the rewards will struck in the Bribe contract. Proof-of-Concept Assume that the current epoch is epoch 0, and start date of epoch 0 is Da...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/05/28 12:0 a.m.23 views

BathToken.sol A malicious early user/attacker can manipulate the vault's pricePerShare to take an unfair share of future users' deposits

Lines of code Vulnerability details function deposituint256 assets, address receiver internal returns uint256 shares uint256 pool = underlyingBalance; uint256 before = underlyingToken.balanceOfaddressthis; // Assume caller is depositor underlyingToken.transferFrommsg.sender, addressthis, assets;...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/05/08 12:0 a.m.23 views

Users Can Prevent Excess Tokens From Being Withdrawn By The Pool Creator In withdrawExcessRewards()

Lines of code Vulnerability details Impact Because pools will likely never be fully utilised by stakers while active, the following assumption in withdrawExcessRewards can be broken by preventing any receipt withdrawal: requirepool.totalDepositsWei == 0, 'Cannot withdraw until all deposits are...

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

Undesired behavior

Lines of code Vulnerability details You push a parameter into an array of tokens without checking if it's already exists. And if at first it's added with amount 0 it can later on be pushed with a greater amount and be twice in the array. Then in all processing it will consider the first occurrenc...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/01/05 12:0 a.m.23 views

lockWithPermit() function allows for replay attacks and signature malleability

Handle jayjonah8 Vulnerability details Impact In XDEFIDistribution.sol the lockWithPermit function calls permit on the XDEFI token. The problem with simply using permit alone for this is the message that is signed by the owner using the ECDSA algorithm. The message only contains the receiver...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/12/09 12:0 a.m.23 views

Basket can be fully drained if the auction is settled within a specific block

Handle Ruhum Vulnerability details Impact The settleAuction function allows someone to settle the auction by transferring funds in a way that the new pending index is fulfilled. As a reward, they are able to take out as many tokens as they want as long as the pending index is fulfilled after that...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2021/12/03 12:0 a.m.23 views

LockeERC20.sol: Frontrun attack on approve()

Handle itsmeSTYJ Vulnerability details Impact It is possible to frontrun the standard ERC20 token approve function. Proof of Concept Read this for more info. Recommended Mitigation Steps Either require that allowance is 0 before approve can be called or use increase / decrease allowance e.g...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/07/21 12:0 a.m.23 views

Deployer backdoors in DAOVault, Router and SynthVault contracts

Handle 0xRajeev Vulnerability details Impact The contracts use an access control pattern where the contract deployer is included in the onlyDAO modifier which is used for authorized access to critical functions. Such contracts also include a purgeDeployer function which renounces sets to...

7AI score
Exploits0
Code423n4
Code423n4
added 2024/01/26 12:0 a.m.22 views

BLOCK_EPOCH and WEEK should not be mixed

Lines of code Vulnerability details Impact Rewards and voting weights are aligned on a weekly basis. In contract LendingLedger, reward is recorded for each epochblock.number. However, when calling gaugerelativeweightwrite, we should actually pass a timestamp, or the weight cannot be retrieved...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2024/01/08 12:0 a.m.22 views

Mint function can exceeds a predefined limitin when flationRemainder function exist overflow at OLAS.sol contract

Lines of code Vulnerability details Impact mint function can exceeds a predefined limit when inflationRemainder function exist overflow at OLAS.sol contract Proof of Concept 1.First call Burn function,Burn function call burn can cause overflow, we can get a big totalSupply. 2.Second call mint. At...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2024/01/08 12:0 a.m.22 views

use of 0.8.20

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. This is because solidity 0.8.20 introduces the PUSH0 0x5f opcode which is only supported on the ETH mainnet and not on any other chains. That's why other chains can't find the PUSH0 0x5f opcode and thro...

7.3AI score
Exploits0
Code423n4
Code423n4
added 2023/12/21 12:0 a.m.22 views

liquidatePosition() change LOAN_TERM may result in the borrower paying additional liquidation fees.

Lines of code Vulnerability details Vulnerability details Currently, there are three ways to close a position: 1. The borrower voluntarily closes it through closePosition. 2. If Premium is insufficient, it is forcibly closed by liquidatePosition. 3. After the loan expires, LP forcibly closes it b...

6.7AI score
Exploits0
Total number of security vulnerabilities5000