Lucene search
K
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
•added 2023/03/30 12:0 a.m.•12 views

poolPrice() is vulnerable to price manipulation

Lines of code Vulnerability details Impact The output of poolPrice, which is used to determine the price of rETH, can be manipulated to become extremely small or large. An attacker abuse this to gain large amounts of SafETH during staking. Vulnerability Details In the Reth contract, poolPrice...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/03/30 12:0 a.m.•12 views

And all this assembly shall know that the OWNER SafEth not with derivatives: for the derivative is the OWNER'S, and he will rebalanceToWeights it into his EOA.

Lines of code Vulnerability details Impact The owner of SafEth can at any time steal all staked funds. Proof of Concept SafEth.addDerivative allows the owner to add any derivative contract, such as one where he can withdraw all IDerivative.deposit-ed funds. SafEth.adjustWeights allows the owner t...

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

LiquidityPool.sol#L657 : setFees() could be abused to steal the funds when there is huge transacion is happening.

Lines of code Vulnerability details Impact Set fee functions can be set to any arbitrary value when the transaction is happening. There are more possibility that user could lose most of all of their hard earned funds. Proof of Concept Below functions can be called by autheraised person to fix the...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/03/20 12:0 a.m.•12 views

Division by zero error causes KangarooVault to be DoS with funds locked inside

Lines of code Vulnerability details KangarooVault can be DoS with funds locked in the contract due to a division by zero error in getTokenPrice as it does not handle the scenario where getTotalSupply is zero. Impact Funds will be locked within the KangarooVault as shown in the PoC below and it is...

6.5AI score
Exploits0
Code423n4
Code423n4
•added 2023/03/20 12:0 a.m.•12 views

Incorrect calculation of usedFunds in LiquidityPool leads to lower than expected token price

Lines of code Vulnerability details In LiquidityPool.sol, the functions openLong, closeLong, openShort and closeShort do not deduct hedgingFees from usedFunds to offset the hedgingFees that was added due to hedge. Impact The missing deduction of hedgingFees will increase the usedFunds in...

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

[bootloader] A bytecode hash without the bytecode (preimage) can be marked as known, breaking the prover

Lines of code Vulnerability details This is a report of a finding in bootloader.yul. While the file is out of scope of the contest, the sponsor stated that they would still accept findings in the file and would judge them separately from the contest. Impact A bytecode hash for which the bytecode...

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

My Findings

Lines of code Vulnerability details Impact 1. Integer overflow: In the publishCompressedBytecode function, the check dictionary.length = 2 16 8 is intended to ensure that the dictionary does not become too large, but it is not sufficient to prevent an integer overflow. If dictionary.length exceed...

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

Unchecked return values in setValueForNextCall

Lines of code Vulnerability details Title: Description: When creating a contract, if there is value to be transferred the constructContract function of ContractDeployer will use the SystemContractsHelper.setValueForNextFarCall Method: However in constructContract function doesn't verify that the...

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

Unchecked return value of call will allow to send messages marked as sent but will fail due to not enough gas

Lines of code Vulnerability details Impact On the sendTol1 function, they are sending the message via the SystemContractHelper: SystemContractHelper.toL1true, bytes32uint256uint160msg.sender, hash; the problem relies on the fact that they are not checking whether the message was actually sent...

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

Here are some potential security vulnerabilities that I have identified in this particular contract (BytecodeCompressor.sol)

Lines of code Vulnerability details Impact 1. Integer overflow: In the publishCompressedBytecode function, the check dictionary.length = 2 16 8 is intended to ensure that the dictionary does not become too large, but it is not sufficient to prevent an integer overflow. If dictionary.length exceed...

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

Reentrancy in ProfilePicture.mint()

Lines of code Vulnerability details Impact Reentrancy in ProfilePicture.mint Proof of Concept The protocol allows user to mint a PFP NFT. Inside the mint function ,there is a check that ERC721nftContract.ownerOfnftID != msg.sender, as the code below the nftContract and nftID is specified by the...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•12 views

Attacker can abuse rounding down to get reward without depositing anything in LP pool

Lines of code Vulnerability details Impact In function withdrawLP, it calculates the amount of points from the amount input parameter. unchecked uint256 points = amount 100 / 1e18 lpPosition.multiplier / DIVISOR; // Update the caller's LP token stake. lpPosition.amount -= amount; lpPosition.point...

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

Flawed calculation in getPoolReward leads to permanent loss of rewards

Lines of code Vulnerability details In NeoTokyoStaker.getPoolReward, a users reward is calculated as follows: 1388: uint256 share = points PRECISION / pool.totalPoints totalReward; 1390: share /= PRECISION; points represents the users total points in the pool over a specific potentially long time...

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

Updating a pool's total points doesn't affect existing stake positions for rewards calculation

Lines of code Vulnerability details Impact Staking rewards are calculated based on the user's share of total points in the corresponding asset pool, this is the sum of the points associated to the staker's positions divided by the total points from all positions in the pool. We can see this...

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

Upgraded Q -> 2 from #345 [1678798666534]

Judge has assessed an item in Issue 345 as 2 risk. The relevant finding follows: Issue 1 - An attacker can leave the protocol in a "drawing" state for extended period of time --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•12 views

Incorrect EIP1271 magic value returned from DAO.isValidSignature

Lines of code Vulnerability details Impact An unexpected return value from the EIP1271 signature verification can lead to authorization for unwanted operations in external protocols. Proof of Concept As shown in the EIP1271 standard specification, when a signature is not valid, the returned magic...

7.3AI score
Exploits0
Code423n4
Code423n4
•added 2023/03/09 12:0 a.m.•12 views

claimPerDraw() can accounts for referrals after the ticket registration deadline

Lines of code Vulnerability details When accounting for referrals, the beforeTicketRegistrationDeadline ensure tickets cannot be purchased after the draw registration deadline. The issue is that the referral registration happens for the current draw regardless of which draw the tickets are...

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

Price manipulation attack

Lines of code Vulnerability details Impact The PriceFeed.sol was marked OOS but I believe this to be a valid issue. If the chainlink feed fails which is does from time to time, the Tellor price feed takes over no matter what the delta is compared to the chainlink price. This is an issue because t...

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

ReaperVaultERC4626.sol is not EIP-4626 compliant

Lines of code Vulnerability details Impact Other protocols integrated with Ethos Reserve may mistakenly assume that its function complies with EIP-4626. Therefore, this may lead to integration issues in the future, which could result in various problems for both parties. Proof of Concept All...

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

Losses are double counted if there currently locked profits

Lines of code Vulnerability details Impact Losses are double counted and vault participants lose funds Proof of Concept if roi 0 vars.gain = uint256roi; vars.fees = chargeFeesvars.stratAddr, vars.gain; strategy.gains += vars.gain; ... // Profit is locked and gradually released per block // NOTE:...

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

LUSDT non-compliance with the EIP-2612 standard

Lines of code Vulnerability details Impact Inability to integrate LUSDT into contracts of other services where the DOMAINSEPARATOR is used or strict adherence to the EIP2612 standard is required. Various network analyzers that automatically determine the type of contracts will not be able to...

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

Re-entrancy inside BorrowOperations if collateral is ERC777

Lines of code Vulnerability details Impact Invariant violations through re-entrancy if the collateral token is ERC777 Proof of Concept If the collateral token will be an ERC777 token, a malicious user could use the safeTransfer from L231 to re-enter the BorrowOperations contract context and call...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/03/07 12:0 a.m.•12 views

Users would lose some shares during withdrawal in ReaperVaultV2._withdraw().

Lines of code Vulnerability details Impact ReaperVaultV2.withdraw burns 100% of shares even if the vault balance is less than the required underlying amount. As a result, users would lose some shares during withdrawal. Proof of Concept Users can receive underlying tokens by burning their shares...

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

Using _freefunds() to calculate share price lead to shares miscalculations and could benefit treasury

Lines of code Vulnerability details Impact Function freeFunds calculates the amount of free funds available after profit locking and it's used to for calculating share price, issuing shares during deposit, or burning shares during withdrawal. Value returned by freeFunds is time-dependant, because...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/21 12:0 a.m.•12 views

KUMASwap incorrectly reverts when when _maxCoupons has been reached

Lines of code Vulnerability details Impact Selling bonds with coupons that are already accounted will fail unexpectedly Proof of Concept if coupons.length == maxCoupons revert Errors.MAXCOUPONSREACHED; The above lines will cause ALL bonds sales to revert when coupons.length has reached maxCoupons...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/17 12:0 a.m.•12 views

Early staker can disable staking by issuing and sending a bit to Furance

Lines of code Vulnerability details This one is caused by mitigation to issue M-05 Impact Early issuer can issue less than one wad e.g. 9e17 wei and send it to the Furnace contract, then whenever anyone is trying to issue more RTokens melt would be called, since there’s less than 1 wad in total...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/14 12:0 a.m.•12 views

Transferring the allotAmount reward to MultisigManager leads to the loss of reward when no wallet is enabled in the RewardsPool

Lines of code Vulnerability details Impact Transferring the allotAmount reward to MultisigManager leads to the loss of reward Proof of Concept If we refers to the original M-21 finding: code-423n4/2022-12-gogopool-findings143 Division by zero error can block RewardsPoolstartRewardCycle if all...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/12 12:0 a.m.•12 views

Upgraded Q -> 2 from #353 [1676219078358]

Judge has assessed an item in Issue 353 as 2 risk. The relevant finding follows: 06 UPGRADEABLE CONTRACT IS MISSING A GAP50 STORAGE VARIABLE TO ALLOW FOR NEW STORAGE VARIABLES IN LATER VERSIONS --- The text was updated successfully, but these errors were encountered: All reactions...

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

Missed owner accrual in MultiRewardStaking _withdraw() leads to reward loss

Lines of code Vulnerability details Impact Function withdraw can be called from an approved caller to withdraw owner funds. The function accrues rewards for caller and receiver but misses the accrual for owner. If, for example, the owner didn't accrue any reward from the beginning of time and all...

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

Upgraded Q -> 3 from #664 [1675726078144]

Judge has assessed an item in Issue 664 as 3 risk. The relevant finding follows: L-1 ERC20 Quest: withdrawFee function should only be able to be called once instead of multiple times Issue: The withdrawFee function can be called multiple times by admin after a quest ends, resulting in more than t...

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

Upgraded Q -> 2 from #615 [1675724239375]

Judge has assessed an item in Issue 615 as 2 risk. The relevant finding follows: Unbounded gas usage in claim function of Quest contract The claim function has an unbounded gas usage that traverses different arrays many times. The call to RabbitHoleReceipt.getOwnedTokenIdsOfQuest iterates all...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/03 12:0 a.m.•12 views

[M-01] emitUserMetadata function may fail due to exceed gas limit

Lines of code Vulnerability details Impact The function emitUserMetadata in DripsHub may fail due to unbounded loop over userMetadata can be very large due to the user input. However, function could be called only from drivers, it's still public and large array could be passed. And the loop in...

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

Squeezing drips from a sender can be front-run and prevented by the sender

Lines of code Vulnerability details Squeezing drips from a sender requires providing the sequence of drips configurations see NatSpec description in L337-L338: /// It can start at an arbitrary past configuration, but must describe all the configurations /// which have been used since then includi...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/03 12:0 a.m.•12 views

Code breaks if first user is not expected user

Lines of code Vulnerability details Code breaks if first user is not expected user Summary Rather than iterate and continue if user is not the expected one, this code breaks all the execution if first user is userId Vulnerability Detail Execution is broke most of the times at first iteration for ...

7.4AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/03 12:0 a.m.•12 views

setDrips may distribute the drip too fast if the time hints are not good enough

Lines of code Vulnerability details Impact The setDrips function is used to configure a drip. It can either be withdrawing it, adding a new one, or even managing an existing one by updating the configuration. Internally, it account for the drips that are yet to be distributed to refund them to th...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/02 12:0 a.m.•12 views

Use abi.encode instead of abi.encodePacked to prevent data collisions for object hashing

Lines of code Vulnerability details M-01 Use abi.encode instead of abi.encodePacked Impact hash collisions on the data stored for object hashing Proof of Concept From the solidity documentation: If you use keccak256abi.encodePackeda, b and both a and b are dynamic types, it is easy to craft...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/02 12:0 a.m.•12 views

Solmate's safeTransfer can result in failed transfer with low level call and won't revert as it does not check the codesize of to address, which may lead to loss of funds

Lines of code Vulnerability details The following contract use solmate's SafeTransferLib : solmate/utils/SafeTransferLib.sol Solmate's safeTransfer / safeTransferFrom uses inline assembly call to transfer ether from contract to receiver. According to Solidity Docs the call may return true even if...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/02 12:0 a.m.•12 views

ERC721 safeTransferFrom is not enough to safeguard a subprotocol NFT

Lines of code Vulnerability details Proof of Concept There is a safeguard mechanism to ensure that no transfers of the subprotocol NFT happen after said NFT is tied to the CID NFT. Without it, someone could transfer or even burn the subprotocol NFT while it is still associated. // The CID Protoco...

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

Locked Ether

Lines of code Vulnerability details Description Contract with a payable function, but without a withdrawal capacity. Impact Every Ether sent to LendgineRouter will be lost. Proof of Concept File: src/periphery/LendgineRouter.sol 142: function mintMintParams calldata params external payable...

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

No-check liquidity is != 0

Lines of code Vulnerability details Impact Proof of Concept Tools Used manual Recommended Mitigation Steps --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/01 12:0 a.m.•12 views

Lack of slippage protection when swapping on Uniswap v2/v3

Lines of code Vulnerability details Impact Lack of slippage protection when swapping on Uniswap v2/v3. It'll create the potential to be sandwiched by MEV bots and result in user loss. Proof of Concept In the LendgineRouter.mint function, the contract would swap all the token0 to token1 in...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2023/02/01 12:0 a.m.•12 views

Loss of funds - User has control of the fallback function

Lines of code Vulnerability details Imapct: Lendengine check the balanceBefore and after of token1, after sending tokens via a mintFallback function. During this fallback the user has access to theses tokens so far as it's returned + collateral the fallback is satisfied. A attacker can take out...

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

Fee on transfer tokens will not behave as expected

Lines of code Vulnerability details Impact In Numoen, it does not specifically restrict the type of ERC20 collateral used for borrowing. If fee on transfer tokens is/are entailed, it will specifically make mint revert in Lendgine.sol when checking if balanceAfter balanceBefore + collateral. Proof...

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

Wrongly implemented modifier allow everybody to mint Rabbit Hole tickets.

Lines of code Vulnerability details Impact As specified on RabbitHole C4 contest page, RabbitHoleTickets smart contract 'is an 1155 reward contract used by the RabbitHole team.' Meaning that the assets managed by this smart contract have value. Moreover this contract implements ERC-2981: NFT...

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

## [H-02] Return value of 0 from ecrecover not checked

Lines of code 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 2023/01/30 12:0 a.m.•12 views

QuestFactory is suspicious of the reorg attack

Lines of code Vulnerability details Description The createQuest function deploys a quest contract using the create, where the address derivation depends only on the QuestFactory nonce. At the same time, some of the chains Polygon, Optimism, Arbitrum to which the QuestFactory will be deployed are...

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

ONLYMINTER MODIFIER WILL NOT REVERT WHEN MSG.SENDER IS NOT MINTERADDRESS

Lines of code Vulnerability details Impact onlyMinter in RabbitHoleReceipt.sol and RabbitHoleTickets.sol is noted to be housing only msg.sender == minterAddress in its code logic. RabbitHoleReceipt.solL58-L61 RabbitHoleTickets.solL47-L50 modifier onlyMinter msg.sender == minterAddress; ; It will...

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

Mitigation of H-02: See comments

Lines of code Vulnerability details The PR applies the recommended mitigation from the finding, but doesn't take into account the rounding issue identified in M-09 Impact If the price the NFT is bought for is not an exact multiple of the filledQuantities, there will be a loss of precision, and...

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

Attacker can steal the NFT bought by sending it to another vault he control

Lines of code Vulnerability details Impact The mitigation of H-08 try to validate the vault returned by market with the VaultRegistry. However, it only validated if the vault exists, but not if it is the correct vault. A similar attack described in code-423n4/2022-12-tessera-findings47 can be...

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

Overflow Vulnerability in Splits Contract Due to Maximum Splits Receivers Limitation (_MAX_SPLITS_RECEIVERS = 200)

Lines of code Vulnerability details Impact If more than 200 splits receivers are added for a single user, the constant MAXSPLITSRECEIVERS will be exceeded, causing unexpected behavior in the contract uint256 internal constant MAXSPLITSRECEIVERS = 200; Proof of Concept a. Create an array of splits...

6.8AI score
Exploits0
Total number of security vulnerabilities5000