Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/08/02 12:0 a.m.11 views

Lack of protection when caling CusdcV3Wrapper._withdraw

Lines of code Vulnerability details Impact When unwrapping the wComet to its rebasing comet, users with an equivalent amount of wComet invoking CusdcV3Wrapper.withdraw at around the same time could end up having different percentage gains because comet is not linearly rebasing. Moreover, the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/02 12:0 a.m.22 views

Potential Early Exploit in Morho-Aave ERC4626 Implementation

Lines of code Vulnerability details Impact The issue discovered can be exploited when a vault is initially empty. A malicious actor could frontrun a legitimate user's deposit, contributing a negligible amount to the vault. This allows the actor to own shares while the total asset in the vault is...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/02 12:0 a.m.13 views

Lack of protection when withdrawing Static Atoken

Lines of code Vulnerability details Impact The Aave plugin is associated with an ever-increasing exchange rate. The earlier a user wraps the AToken, the more Static Atoken will be minted and understandably no slippage protection is needed. However, since the rate is not linearly increasing,...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/01 12:0 a.m.14 views

Potential Loss of Rewards During Token Transfers in StaticATokenLM.sol

Lines of code Vulnerability details Impact This issue could lead to a permanent loss of rewards for the transferer of the token. During the token transfer process, the beforeTokenTransfer function updates rewards for both the sender and the receiver. However, due to the specific call order and th...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.60 views

excuteProposal can fail due to Wormhole guardian change

Lines of code Vulnerability details Impact Wormhole governance can change signing guardian sets. If this happens between a proposal is queued and a proposal is executed. The second verification in executeProposal will fail as the guardian set has changed between queuing and executing. This would...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.12 views

Missing Input Validation and Error Definition

Lines of code Vulnerability details Impact Missing Input Validation and Error Definition of globalSupplyIndex & globalBorrowIndex in L827-L844 & L865-L883 respectively of MultiRewardDistributor.sol could create complications as "sub" function of L844 & L883 would stop execution in cases of...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.11 views

Divide before multiply

Lines of code Vulnerability details Impact Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss. Proof of Concept Tools Used Recommended Mitigation Steps Consider ordering multiplication before division. Assessed type Math --- The text...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.7 views

exitMarket was missing reentrancy protection.

Lines of code Vulnerability details Impact exitMarket function in Comptroller.sol function was missing checks to prevent reentrancy exploitation. This allowed an attacker to call exitMarket multiple times before the newly borrowed amount was recorded. Since the borrowed amount was not actually...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.7 views

processBlock() function forcibly wrapping a follow NFT could lock it without the owner's consent

Lines of code Vulnerability details Impact It locks the NFT against the owner's wishes. Proof of Concept processBlock is called by the LensHub when a profile is blocked It first checks if the follow NFT is wrapped using isFollowTokenWrapped If not wrapped, it forces wrapping by minting to the own...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.16 views

Race condition in approve function can lead to more funds than intended being transferred

Lines of code Vulnerability details Impact The approve function from MToken.sol contains a front-running vulnerability that allows a user to spend more tokens than he should. Proof of Concept Lets take the following scenario: 1. Alice calls approveEve, 10. This permits Eve to spend 10 tokens from...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.9 views

Using LensBaseERC721::_safeTransfer may lead to tokens being locked forever

Lines of code Vulnerability details Impact As we are all aware of, the OZ Address.sol function isContract can be bypassed because as the docs says: It is unsafe to assume that an address for which this function returns false is an externally-owned account EOA and not a contract. Among others,...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.13 views

Liquidator can seize more tokens than the borrower has as collateral, leading to an arithmetic underflow and locking collateral.

Lines of code Vulnerability details Impact Lack of validation on seizeTokens could allow collateral locking by underflow. Proof of Concept The liquidateBorrowFresh function does not explicitly validate that seizeTokens is less than or equal to accountTokensborrower before transferring tokens from...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.8 views

setDirectPrice is vulnerable to sandwich attack

Lines of code Vulnerability details Impact In ChainlinkOracle.sol we have setDirectPrice: function setDirectPriceaddress asset, uint256 price external onlyAdmin emit PricePostedasset, pricesasset, price, price; pricesasset = price; This function setDirectPrice allows the admin...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.14 views

Integer overflow in getDerivedPrice()

Lines of code Vulnerability details Impact An integer overflow could cause the getDerivedPrice function to return an incorrect price. This could lead to financial losses for users of the contract. Proof of Concept Sure, I can generate a report with this information for all the bugs in the smart...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.15 views

Migration of Profiles can fail due to difference in handle validity in V1 and V2

Lines of code Vulnerability details Impact Profiles with certain type of handles in V1 cannot be migrated to V2. Proof of Concept In V1 and V2, the validity of handles is determined differently. Due to this it is possible that some profiles have handles that are valid according to V1 validation b...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.7 views

Possible integer underflow

Lines of code Vulnerability details Impact The previous FollowNFT implementation is different between v1.3 and v2.0. The followerCount is 0 for existing FollowNFTeven if lastFollowTokenId is not 0 after upgrade. // Old uint256 lastFollowTokenId slot splitted into two uint128s to include...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.10 views

EIP-712 typehash is incorrect for several functions in MetaTxLib

Lines of code Vulnerability details Bug Description In LensHub.sol, the second parameter of setProfileMetadataURIWithSig is declared as metadataURI: LensHub.solL119-L123 function setProfileMetadataURIWithSig uint256 profileId, string calldata metadataURI, Types.EIP712Signature calldata signature...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.12 views

Any extra reward tokens that accumulate in the contract remain locked there permanently.

Lines of code Vulnerability details Impact Funds get locked in contract resulting to Loss of asset control, funds and increased costs to recover fund Proof of Concept Reviewing the list of external and public functions, there is no withdraw or reclaim function: 2. Scanning the contract code, ther...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.18 views

liquidateBorrow() mTokens that do not enter the market can still be liquidated as collateral

Lines of code Vulnerability details Impact borrower's mTokens that do not join the market, but it still be Liquidation as collateral Proof of Concept If user wants to use mToken as collateral, the user needs to enter market with enterMarket function. / @notice Add assets to be included in account...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.14 views

First Depositor Attack is possible by front-running mip00 script execution

Lines of code Vulnerability details Overview The First Depositor Attack Within the context of Compound v2, a First Depositor Attack occurs when an attacker becomes the inaugural minter of a cToken. This enables them to establish the first exchange rate between the underlying asset and the cToken...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.12 views

Potential Stale Data Due to Inadequate Round Validation

Lines of code Vulnerability details Impact Even tough the dev is checking if the data is stale or not some valid prices could still be considered as invalid because of this line: answeredInRound == roundId, sometimes the answeredInRound might be greater than roundId and would still be valid but i...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.9 views

the unfollow contract does random unfollow process of random follow token.

Lines of code Vulnerability details Impact in the FollowNft.sol we have to unfollow function this function is supposed to do unfollow process but as you see the followTokenId variable just returns one random follow id with profile id through mapping and there is no option to select which follow n...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.5 views

Cannot unfollow a profile without having access to the Follow NFT

Lines of code Vulnerability details Impact In scenarios where a user fails to unfollow a profile before selling his follow NFT, he could forever be unable to unfollow the profile. Proof of Concept A user could sell his follow NFT without unfollowing a profile. If the new owner of the follow NFT...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.12 views

Overflow/underflow when creating the exchange rate Exp.

Lines of code Vulnerability details Impact Incorrect exchange rate values Proof of Concept the exchangeRateStoredInternal function is missing validation on the Exp mantissa size before creating the exchange rate Exp. This could lead to overflow. This would make the mantissa of exchangeRate equal ...

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

Users repay more than the approved amount.

Lines of code Vulnerability details Impact More tokens can be repaid than were approved leading to loss of funds Proof of Concept The repayBorrowFresh function does the following: 1. Checks if repay is allowed by calling comptroller.repayBorrowAllowed with the input repayAmount. 2. Fetches the...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.21 views

the check for the roundId == answeredInRound should be set to >= in the ChainlinkCompositeOracle.sol#getPriceAndDecimals

Lines of code Vulnerability details Impact the function getPriceAndDecimals have check that it check if the round id is equal to the answer in round ID. this check should be change to = because some roundID may get the data/answers in the round that is more than the roundId and this case is...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.15 views

the TemporalGovernor.sol can be unpaused when it should still in the pause mood

Lines of code Vulnerability details Impact the TemporalGovernor implemented in a way that if the guardians pause the system then the system will be paused to period of time and the system will remove the guradians approve till the system reApprove them again and going to the unpause mood, the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.10 views

approve() can be front-run

Lines of code Vulnerability details Impact In MToken.sol we have approve function: function approveaddress spender, uint256 amount override external returns bool address src = msg.sender; transferAllowancessrcspender = amount; emit Approvalsrc, spender, amount; ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.9 views

## [M-07] ERC20 return values not checked

Lines of code Vulnerability details Impact Tokens that don’t actually perform the transfer and return false are still counted as a correct transfer and the tokens remain in the SingleNativeTokenExitV2 contract and could potentially be stolen by someone else. Proof of Concept The ERC20.transfer an...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.7 views

Potential Exploitation due to Lack of Price Range Checks in Oracle Implementation

Lines of code Vulnerability details Impact Chainlink aggregators have a built in circuit breaker if the price of an asset goes outside of a predetermined price band. The result is that if an asset experiences a huge drop in value i.e. LUNA crash the price of the oracle will continue to return the...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.6 views

Chainlink's latestRoundData might return stale or incorrect results

Lines of code Vulnerability details Impact Chainlink's latestRoundData is used but there is no check if the return value indicates stale data. This could return stale price data for the underlying asset. Proof of Concept getChainlinkPrice function uses Chainlink's latestRoundData to get the lates...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.12 views

Cannot unwrap token after recovering through wrapping

Lines of code Vulnerability details Impact Cannot unwrap token after recovering through wrapping. Proof of Concept FollowNFTunwrap checks if followerProfileId for the token is not 0: if followDataByFollowTokenIdfollowTokenId.followerProfileId == 0 revert NotFollowing; while after recovering token...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.13 views

Inaccurate implementation of ECDSA creates signature malleability

Lines of code Vulnerability details Impact The ecrecover function is an inherent cryptographic function within Solidity which enables the retrieval of the signer's address messages which have been signed with their private key. Of course, this is very important when it comes to verifying the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.10 views

Unauthorized Admin Transfer Vulnerability

Lines of code Vulnerability details Description The bug in this contract is that it doesn't handle the case when the pendingAdmin is set to the zero address address0. As per the condition msg.sender == address0, the if statement can be bypassed if an attacker sets pendingAdmin to the zero address...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.10 views

Default Account fallback lack payable

Lines of code Vulnerability details Impact fallback lack payable,will lead to differences from the mainnet, and many existing protocols may not work Proof of Concept DefaultAccount Defined as follows: DefaultAccount The implementation of the default account abstraction. This is the code that is...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.5 views

No Receive functiion in TemporalGovernor contract

Lines of code Vulnerability details Impact The function executeProposal in TemporalGovernor contract will fail, if there is a value to send with the call to the targets executeProposal function could send native token out along with a call to the targets encoded in vm.payload, but the current...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.16 views

Any user can claim rewards infinitely from the market without respecting the accrued rewards time

Lines of code Vulnerability details Impact calculateSupplyRewardsForUser updates the user accrued rewards based on the user balance of mTokens & on global and user indicies difference which is the time difference between the last reard claim and the current time . Comptroller contract: one of the...

6.5AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.5 views

Profile owner can set royalties on a follow NFT they don't own.

Lines of code Vulnerability details Impact Profile owner can drain royalties from follow NFTs they don't own Proof of Concept The beforeRoyaltiesSet modifier checking only the profile owner instead of the follow NFT owner presents a major vulnerabilities It allows the profile owner to set royalti...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.5 views

The owner can call _upgrade directly, skipping executeLensV2Upgrade.

Lines of code Vulnerability details Impact Loss of funds due to skipped checks before transfers Invalid system state due to assuming conditions not verified Hiding failed upgrade due to skipped revert/events Proof of Concept upgrade is missing an onlyOwner modifier By calling upgrade directly, th...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.11 views

the getChainlinkPrice() function calling the latestRoundData without using the try/catch to avoid bad possible scenario

Lines of code Vulnerability details Impact Call to latestRoundData could potentially revert and make it impossible to query any prices. the getChainlinkPrice function should use try/catch to avoid the case of the getChainlinkPrice function revert and cause dos/block the system. Proof of Concept t...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.9 views

FollowNFT storage collision

Lines of code Vulnerability details Impact The lastFollowTokenId of FollowNFT contract has a storage collision. V2.0 storage layout: | lastFollowTokenId | uint128 | 17 | 0 | 16 | contracts/FollowNFT.sol:FollowNFT | | followerCount | uint128 | 17 | 16 | 16 | contracts/FollowNFT.sol:FollowNFT |...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.5 views

User can bypass their approved redeem allowance

Lines of code Vulnerability details Impact The caller can bypass the allowance check by exploiting the exchange rate calculation and drain funds from the contract up to the full balance owned by msg.sender, not just the amount approved in the allowance. Proof of Concept The issue is that...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.9 views

Users can unfollow through FollowNFT contract when LensHub is paused by governance

Lines of code Vulnerability details Bug Description When the LensHub contract has been paused by governance state set to ProtocolState.Paused, users should not be able unfollow profiles. This can be inferred as the unfollow function has the whenNotPaused modifier: LensHub.solL368-L371 function...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.19 views

BORROWERS CAN AVOID LIQUIDATIONS, IF ERC777 TOKEN IS CONFIGURED AS AN emissionToken

Lines of code Vulnerability details Impact If a borrower is undercollateralized then he can be liquidated by a liquidator by calling the MErc20.liquidateBorrow function. liquidateBorrow function calls the MToken.liquidateBorrowFresh in its execution process. Inside the liquidateBorrowFresh functi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.8 views

In LensBaseERC721.sol#_transfer() Lack of check from==to

Lines of code Vulnerability details Impact In LensBaseERC721.soltransfer balances of from and to are stored in temporary variables and after the subtration, addition operation the results are written to storage. In the second operation since the original balance is used in the addition operation,...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.12 views

Inconsistent encoding of arrays in MetaTxLib

Lines of code Vulnerability details Bug Description According to the EIP-712 specification, arrays are encoded by concatenating its elements and passing the result to keccak256: The array values are encoded as the keccak256 hash of the concatenated encodeData of their contents i.e. the encoding o...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.10 views

Users can burn follow token without unfollow

Lines of code Vulnerability details Impact Lack of access control in this function can lead to users burning their tokens without updating related mappings. For example in the FollowNFT.sol contract, burn function will call unfollowIfHasFollower function first, and then burn token. but even users...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.10 views

updatedAt TIMESTAMP IS NOT USED TO DETECT STALE ORACLE PRICES

Lines of code Vulnerability details Impact The external Chainlink oracle, which provides index price information to the system, introduces risk inherent to any dependency on third-party data sources. For example, the oracle could fall behind or otherwise fail to be maintained, resulting in outdat...

6.4AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.10 views

External visibility modifier on function that should be callable from address(this). Doesnt seem right.

Lines of code Vulnerability details Impact External visibility modifier on function that should be callable from addressthis. Doesnt seem right. Proof of Concept /// @notice grant the guardians the pause ability function grantGuardiansPause external require msg.sender == addressthis, /// @audit i...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/07/31 12:0 a.m.12 views

function _queueProposal not checking if the required time is passed to allow proposal to set to the queue list

Lines of code Vulnerability details Impact in the queueProposal function there is no check for if the requested time is passed to allow queue the proposal. in this case any proposal after creating can be added to the queue list. Proof of Concept the TemporalGovernor.sol contract have a variable...

6.8AI score
SaveExploits0
Total number of security vulnerabilities10190