Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/08/02 12:00 a.m.•31 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/02 12:00 a.m.•37 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:00 a.m.•22 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/01 12:00 a.m.•30 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:00 a.m.•17 views

Whitelisted profile creators could accidentally break migration for V1 profiles

Lines of code Vulnerability details Bug Description Profiles that exist before the V2 upgrade are migrated using the batchMigrateProfiles function, which works by minting the profile's handle and linking it to their profile: MigrationLib.solL69-L85 string memory handle =...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•14 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:00 a.m.•26 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:00 a.m.•27 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:00 a.m.•21 views

The onlyProfileOwnerOrDelegatedExecutor and whenNotPaused checks can be bypassed

Lines of code Vulnerability details Impact The LensHub.sol functions setProfileMetadataURI, setProfileMetadataURIWithSig, setFollowModule, setFollowModuleWithSig, collect, collectWithSig, act, actWithSig, setProfileImageURI, setProfileImageURIWithSig and others use...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•29 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:00 a.m.•18 views

Anyone can permanently disable the token guardian for their wallet by calling this one DANGER__disableTokenGuardian function

Lines of code Vulnerability details Impact A hacker could call DANGERdisableTokenGuardian, instantly disable the guardian and steal tokens or make malicious approvals Proof of Concept The DANGERdisableTokenGuardian function is risky and should be reconsidered. The main issue is that it allows...

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

Current setUnderlyingPrice and setDirectPrice open to incorrect liquidation of users' positions and result in financial losses for users

Lines of code Vulnerability details Impact Price feeds can be affected by network congestion, causing transactions with outdated prices to be treated as current prices. As price feeds are crucial to the protocol's functioning, this situation can lead to incorrect liquidation of users' positions a...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•13 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:00 a.m.•21 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:00 a.m.•19 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:00 a.m.•15 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:00 a.m.•22 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:00 a.m.•18 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:00 a.m.•13 views

The processBlock() function does the wrapping process wrongly

Lines of code Vulnerability details Impact The blocking process in the FollowNFT contract needs to wrap it first, but it does the wrapping process wrongly. wrapping process in wrap function update some statement and then mint token but if you look at processBlock function, it's just mint token an...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•18 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:00 a.m.•33 views

Users positions can be directly liquidated when the admin changes the collateralFactorMantissa from a higher value to a lower value

Lines of code Vulnerability details Impact In Comptroller contract : Market.collateralFactorMantissa mltiplier represents the maximum underlying asset amount the depositors can borrow against their collateral in a market,for example:if it is set to 0.9;then 90% of collateral value is allowed to b...

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

missing check for the max/min price in the chainlinkOracle.sol contract

Lines of code Vulnerability details Impact the chainlinkOracle.sol contract specially the getChainlinkPrice function using the aggregator v2 and v3 to get/call the latestRoundData. the function should check for the min and max amount return to prevent some case happen, something like this: if cas...

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

Missing check of how recent the price is can lead to stale price being used in the protocol

Lines of code Vulnerability details Impact In the ChainlinkOracle.sol file, in the function getChainlinkPriceAggregatorV3Interface feed, there is the check requireupdatedAt != 0, "Round is in incompleted state";. However, there is no check to see that the price is recent and acceptable. If there ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•18 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:00 a.m.•13 views

Migration of Profiles can fail due to existance of same handle

Lines of code Vulnerability details Impact Some profiles cannot be migrated to V2 if their handle tokenId has already been minted. Proof of Concept A handle can be minted in the LensHandles contract before a profile that would have the same handle is migrated from V1. When the profile attempts to...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•25 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:00 a.m.•26 views

Attacker can Steal all eths of WETHRouter.sol through redeem function

Lines of code Vulnerability details Impact An attacker can Steal eths through redeem function in WETHRouter.sol as you know the contract does the redeem process and redeem user mTokens to ETHs, and as you know we have the function of mint which is the opposite of this and users deposit ETH in ord...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•22 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:00 a.m.•16 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:00 a.m.•15 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:00 a.m.•26 views

Incorrect liquidity calculations if snapshot errors occur

Lines of code Vulnerability details Impact incorrect liquidity values that undermine the risk checks and constraints of the protocol Proof of Concept getHypotheticalAccountLiquidityInternal does not handle snapshot errors properly. Specifically: It calls MToken.getAccountSnapshot to get the...

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

THERE IS NO FUNCTIONALITY TO LIQUIDATE THE DEPRECATED MTOKEN MARKETS

Lines of code Vulnerability details Impact The Mtoken markets configured for the respective collateral asset types can get deprecated due to various reasons associated with those assets. There should be functionality in the Comptroller.liquidateBorrowAllowed function to liquidate all the borrows ...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•20 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:00 a.m.•14 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:00 a.m.•16 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:00 a.m.•25 views

safe32 WILL RESTRICT THE DURATION OF MultiRewardDistributor._addEmissionConfig FUNCTION USABILITY

Lines of code Vulnerability details Impact The MultiRewardDistributor.addEmissionConfig function is used to add a new emission configuration for a specific market. The addEmissionConfig function constructs the MarketConfig configuration struct using the input parameters to the function. The...

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

The project's reputation and user funds can be affected if a clear invariant is not met

Lines of code Vulnerability details Vulnerability details Impact The protocol may not work as expected in years that are not 365 days long, which could lead to a loss of confidence in the protocol. In fact, the next year is one of those years leap year. Furthermore, defining it as a constant in t...

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

if _rescueFunds was called with the address of a mToken, the admin would currently be able to sweep those tokens,

Lines of code Vulnerability details Impact It allows the admin to steal deposited funds from users It removes mTokens used as collateral to back borrows Proof of Concept Assume there is a mToken at address 0x123 that has issued some tokens. The admin calls rescueFunds0x123, uint.max. This will...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•18 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:00 a.m.•16 views

the unbounded approve function allows a front-running vulnerability due to setting unlimited allowance.

Lines of code Vulnerability details Impact if approve is called with a very high allowance, the spender can drain the owner's entire balance. Proof of Concept approve allows setting an allowance to any arbitrary uint256 value, including typeuint.max. This effectively gives unlimited approval to t...

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

profileIdAllowedToRecover is not handled properly in tryMigrate()

Lines of code Vulnerability details Impact In FollowNFT.sol, when calling tryMigrate, the state at the end should be the same when you call baseFollow and fresh follow the owner of the collection. However, profileIdAllowedToRecover is not handled inside of tryMigrate and it should be deleted as...

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

Attackers might be able to avoid calling reference modules when creating publications

Lines of code Vulnerability details Bug Description When comment, mirror or quote is called on a publication with a reference module, the reference module will be called. For example, when a user mirrors another publication with a reference module, the processMirror function of that reference...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•21 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:00 a.m.•22 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:00 a.m.•22 views

Due to revert found during testing it would be wise to implement a rollback and re-whitelist should it be needed

Lines of code Vulnerability details Impact During testing with the Mainnet fork for the migration testing. We needed to make a distinction between V1 Profiles and V2 profiles within the test code, but this is not so in the standard V2 code, and may cause unforeseen issues after the upgrade. The V...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/31 12:00 a.m.•21 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:00 a.m.•35 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:00 a.m.•19 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:00 a.m.•12 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:00 a.m.•30 views

First mint user can inflate share which can steal asset from other user

Lines of code Vulnerability details Impact A well know inflation attack/first deposit mint bug. The attacker can steal assets from other user's deposit mint. Proof of Concept The Moonwell project is a fork from the Compound Protocol. The MToken the MToken on Compound represents a yield-bearing...

6.7AI score
SaveExploits0
Total number of security vulnerabilities10190