Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2022/11/13 12:0 a.m.16 views

Unsafe ERC20 operations due to lack of contract length check

Lines of code Vulnerability details Impact Functions executeERC20DirectTransfer and executeERC20TransferFrom replicates solmate libraries methods. The problem with this is that these functions does not check existence of code at the token address. If executeERC20DirectTransferand...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2022/11/13 12:0 a.m.8 views

Contract LooksRareAggregator Ownership renouncement may leave a deficient smart contract in operation and there is no way to fix it

Lines of code Vulnerability details Impact LooksRareAggregator can renounce ownership and the system can still operate with already set parameters. However, many important functions cannot be called any more in this situation such as setFee, addFunction rescureERC721, rescueETH, etc. This means...

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

calling execute() may lead to stealing funds if some ETH is stuck on the contract

Lines of code Vulnerability details Impact if some Ether is sent erroneously or not to the contract, anyone that calls correctly LooksRareAggregator.execute will be able to steal those coins. to execute the function using ethers as payment, these conditions must be true: there is at least a trade...

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

Missing check of return value of ETH transfer

Lines of code Vulnerability details Impact When users uses ETH to batch buy NFTs, if the transaction fails, the aggregator contract will call the function returnETHIfAny to return the ETH to the user. This function transfers all the balance in the contract to the recipient through call, but there...

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

Pool funds can be used by anyone due to lack of allowance in the custom implementation of transferFrom

Lines of code Vulnerability details Impact Users' Pool assets can be used by anyone to execute a transaction, essentially stealing from them. Proof of Concept Pool contract uses a custom implementation of transferFrom which allows transfer of Pool assets from any address to any address as long as...

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

Theft of ETH that was not used for successful execution of orders in non-atomic execution

Lines of code Vulnerability details Description There is an execute function in LooksRareAggregator contract. It refunds any ETH that was unused for example that left due to the unsuccessful execution of an order at the end of its execution flow: returnETHIfAnyoriginator; returnETHIfAny function ...

7.4AI score
Exploits0
Code423n4
Code423n4
added 2022/11/13 12:0 a.m.14 views

No Revert on Failure, an order can be execute successfully by disguising them as NFTs.

Lines of code Vulnerability details Impact ERC20 tokens don't throw a error when failed in transfer. A malicious user can pretend to be sending an ERC721 token while it is something else. Orders are getting executed inside LooksRareProxy.sol, an attacker as a maker can make an BasicOrder that has...

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

OwnableTwoStep delay not set

Lines of code Vulnerability details Impact Contract TokenRescuer inherits the contract OwnableTwoSteps but does not set any delay. There should be a constructor in TokenRescuer responsible for setting the delay as described in the comments of the OwnableTwoSteps contract. Without any delay,...

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

Public to all funds escape

Lines of code Vulnerability details Description The LooksRareAggregator smart contract implements a bunch of functions to escape funds by the contract owner see rescueETH, rescueERC20, rescueERC721, and rescueERC1155. In this way, any funds that were accidentally sent to the contract or were lock...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/11/13 12:0 a.m.12 views

Seller can steal ETH which is for other orders of the bulk

Lines of code Vulnerability details Impact The 'bulkExecute' and 'returnDust' functions are susceptible to reentrancy attack. Seller can exploit it to steal ETH which is for other orders of the bulk. Proof of Concept Key steps for successful attack 1 set fee rate to 100% 2 reentrancy call...

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

internalCall modifier can be circumvented with execute / bulkExecute

Lines of code Vulnerability details Impact The internalCall modifier ensures that public functions can only be called from another public function and not directly. It is implemented like that: modifier internalCall requireisInternal, "This function should not be called directly"; ; The modifier...

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

Loss of user funds

Lines of code Vulnerability details Impact The LooksRareAggregator contract can receive ether but cannot return it unless through the returnERC20TokensIfAny or returnETHIfAny function. This means that there is a scenario where a user can accidentally transfer funds to this contract and those fund...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/11/12 12:0 a.m.11 views

Upgraded Q -> M from #107 [1668211909800]

Judge has assessed an item in Issue 107 as M risk. The relevant finding follows: L-01 WardenPledge inherits Ownable instead of Owner The contract imports Owner.sol but inherits Ownable - should both import and inherit Owner --- The text was updated successfully, but these errors were encountered:...

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

Overpayment of ETH is not refunded to the buyer

Lines of code Vulnerability details Impact Overpayment of ETH is not refunded to the buyer Proof of Concept ' function executeFundsTransfer address seller, address buyer, address paymentToken, Fee calldata fees, uint256 price internal if msg.sender == buyer && paymentToken == address0...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/11/12 12:0 a.m.8 views

Replay attack for authorized orders

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Nonce is used by sellers and buyers to avoid replay attack for their orders. However, since sellHash and buyHash only contain the order info and the nonce, it is still possible to have a replay attack...

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

Upgraded Q -> M from #272 [1668215320788]

Judge has assessed an item in Issue 272 as M risk. The relevant finding follows: Inaccurate comment can be misleading. The following retrievePledgeRewards function is for retrieving the non-distributed rewards from an expired pledge, not just a closed pledge. Calling this function for a pledge th...

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

The bulkExecute function does not bypass failed executions.

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. According to the documentation, "Add bulk execute function; attempted executions that fail should be bypassed". However, the implementation of bulkExecute does not conform to this spec. Fail executions...

7.5AI score
Exploits0
Code423n4
Code423n4
added 2022/11/11 12:0 a.m.4 views

Re-Entrancy when invoking ERC20EnabledLooksRareAggregator.execute() function

Lines of code Vulnerability details Impact We didn't check the address of currency . We don't know if the currency is ERC20 or not, and then just invoke currency.call. For these functions, we don't have any Re-Entrancy check. It will definitely lead to an Re-Entrancy issue on the currency side...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/11/11 12:0 a.m.11 views

Upgraded Q -> M from #43 [1668210521611]

Judge has assessed an item in Issue 43 as M risk. The relevant finding follows: Q-02 - Huge trust assumption in recoverErc20 Reward tokens are transferred into this contract when a pledge is created. The comment notes " Recovers ERC2O tokens sent by mistake to the contract", but this function can...

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

Upgraded Q -> M from #20 [1668209885833]

Judge has assessed an item in Issue 20 as M risk. The relevant finding follows: 2. Ownable and Pausable The contract WardenPledge is Ownable and Pausable, so the owner could resign while the contract is paused, causing a Denial of Service. Owner resignation while the contract is paused should be...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/11/11 12:0 a.m.47 views

Unsafe usage of ERC20 transfer and transferFrom

Lines of code Vulnerability details Impact Some ERC20 tokens functions don’t return a boolean, for example, USDT, BNB, OMG. So the LowLevelERC20Transfer contract simply won’t work with tokens like that as the token. Proof of Concept USDT’s transfer and transferFrom functions don't return a bool,...

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

Unlimited length of LineOfCredit.ids: storage collisions

Lines of code Vulnerability details Impact There are no restrictions for ids length So malicious borrower may create many credits and replace storage slot data at some position Proof of Concept 1. LineOfCredit.ids saves array size in slot Oracle data feed is insufficiently validated in Oracle.sol...

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

ETH can be accidentally sent with ERC20 in sendOutTokenOrETH function

Lines of code Vulnerability details Impact ETH can be accidentally sent with ERC20 in sendOutTokenOrETH function User who wants to send ERC20 due to payable function can write a value in the value field Proof of Concept contracts/utils/LineLib.sol: 33 / 34: function sendOutTokenOrETH 35: address...

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

Potential DoS when closing a credit nominated in ETH in the LineOfCredit contract

Lines of code Vulnerability details When closing a credit that was issued in ETH, the LineOfCredit contract will send the lender his deposit and any accrued interests using the address.transferamount function, which may fail and revert the whole function, leading to an eventual DoS. Impact The...

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

Wrong marketplace address in SeaportProxy.sol

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The marketplace variable in SeaportProxy was initialized in the constructor, however since SeaportProxy will only be used in a delegatecall, such initialization in the constructor will be useless as it...

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

Not checking amount of received ERC20 tokens

Lines of code Vulnerability details Description There are ERC20 tokens, which apply intenal fee on transfers such as USDT, so that amount of received tokens could differ from requested amount. There is a line where contract receives facilityFee as an amount of tokens. The same variable is used on...

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

Users are unable to revoke consents

Lines of code Vulnerability details Impact Neither lenders nor borrowers can revoke mutualConsents. This can pose an issue if a lender has given consent to lend funds but a borrower has proven untrustworthy either through actions in another credit line or some other public way. A lender should be...

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

Having nonzero allowance to the exchange will prevent any future trades

Lines of code Vulnerability details Impact A borrower can prevent other lenders to call claimAndRepay, in other words the lenders can not use the revenue streams in the spigotedLine. Proof of Concept Suppose a borrower has a stream of revenue token, and also borrowed some tokens already. Then the...

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

[NAZ-M2] Lack of Price Freshness Check In Oracle.sol#latestRoundData() Allows A Stale Price To Be Used

Lines of code Vulnerability details Impact Oracle.sol should use the updatedAt value from the Oracle.sollatestRoundData function to make sure that the latest answer is recent enough to be used. Proof of Concept In the current implementation of Oracle.sollatestRoundData, there is no freshness chec...

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

Getting collateral value by calling previewRedeem can be manipulated

Lines of code Vulnerability details Proof of Concept The code in EscrowLib is trying to calculate the value of a collateral by calling the previewRedeem method of an ERC4626 vault, when the collateral is a token from such a vault. The EIP4626 specification explicitly says The preview methods retu...

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

revenueContract that uses AccessControl instead of Ownable can’t work with SpigotLib's removeSpigot()

Lines of code Vulnerability details Proof of Concept The code in removeSpigot is the following bool success, = revenueContract.call abi.encodeWithSelector self.settingsrevenueContract.transferOwnerFunction, self.operator // assume function only takes one param that is new owner address ; So...

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

The execute() function of SeaportProxy.sol will always fail.

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. While L69 of SeaportProxy.sol is successful in preventing the function being called by a contract other than the LooksRareAggregator, unfortunately, the current implementation will fail the calling from...

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

Closing a single credit line can be reentered and allows closing all open credit lines

Lines of code Vulnerability details Closing a single credit line can be reentered and allows decrementing count as many times as needed to reach the value 0. As soon as the value is 0, the status of all credit lines will be updated to LineLib.STATUS.REPAID. Reentrancy is possible by the borrower ...

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

Revenue stream split can be bypassed

Lines of code Vulnerability details The Spigot.claimRevenue function allows anyone to claim revenue tokens from the spigot push and pull payments and escrows them for the owner to withdraw later. The revenue is automatically split between the treasury and escrow according to the settings in...

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

Arbitrary call order to handle mutual consent can lead to unrecoverable native ETH

Lines of code Vulnerability details Creating new credits and increasing the credit deposit requires both parties, the lender and the borrower, to agree. This is implemented by having both call the same function with the same call data. However, as it's possible to use native ETH as a credit token...

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

When lender consents before borrower in ETH credit token, all the lent funds are permanently lost.

Lines of code Vulnerability details Description The addCredit function transfers money from lender to a LineOfCredit contract, and opens a credit account. increaseCredit transfers additional funds to an existing credit account contract. Both functions are payable and guarded by mutualConsent, whi...

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

Chainlink USD price feeds can have more than 8 decimals

Lines of code Vulnerability details Impact Collateral value is overestimated by orders of magnitude if asset that has a chainlink oracle USD price feed with more than 8 decimals is added. A borrower can borrow much more than allowed in an EscrowedLine Proof of Concept In Oracle.sol the USD price...

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

Lender will not receive facilityFee if borrower leaves the borrow open with principal zero.

Lines of code Vulnerability details Description The SecuredLine's liquidate function is supposed to be a defense of last resort, for arbiter to claim collateral from borrower who has not paid: function liquidate uint256 amount, address targetToken external whileBorrowing returnsuint256 ifmsg.send...

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

When borrower repays, it can overflow and make them owe 2^256 tokens to lender.

Lines of code Vulnerability details Description CreditLib's repay function is the actual accounting of repayments in a LineOfCredit: function repay ILineOfCredit.Credit memory credit, bytes32 id, uint256 amount external returns ILineOfCredit.Credit memory unchecked if amount =...

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

Borrower can craft a borrow that cannot be liquidated, even by arbiter.

Lines of code Vulnerability details Description LineOfCredit manages an array of open credit line identifiers called ids. Many interactions with the Line operate on ids0, which is presumed to be the oldest borrow which has non zero principal. For example, borrowers must first deposit and repay to...

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

Borrower's principal can be enormous due to underflow

Lines of code Vulnerability details Impact The lender and the borrower can repay borrower's debt using unusedTokens in SpigotedLine.useAndRepay function. The repay amount can be as much as unusedTokenscredit.token in SpigotedLine.useAndRepay143. The actual repay is handled in CreditLib.repay, and...

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

Legitimate token / USD pairs with more than 8 decimals are not handled correctly

Lines of code Vulnerability details Impact The decimals returned by the Chainlink oracles are assumed to be 8 throughout this protocol. However, there are legitimate token / USD pairs that have the corresponding Chainlink oracles to return more than 8 decimals; for example, the AMPL / USD pair's...

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

Borrower can mark his line of credit as repaid by calling line.close(fakeId) repeatedly

Lines of code Vulnerability details Description This vulnerability can be summarized in the following 4 observations: 1. There are no checks to prevent calling line.close with id that doesn’t correspond to any open position. 2. The effect of calling line.close with a fake position id is...

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

Functions addCredit(...) and increaseCredit(...) can lock lender’s ETH forever

Lines of code Vulnerability details Impact In LineOfCredit contract, both functions addCredit... and increaseCredit... require mutual consent between lender and borrower. If lender is tricked by borrower, or by mistake, lender ETH will be locked in the contract forever. function addCredit uint128...

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

useAndRepay function can be used to underflow the principal debt of a credit

Lines of code Vulnerability details The function useAndRepay present in the SpigotedLine contract doesn't check that the amount is within the debt limit and can be used by a malicious lender to underflow the principal variable and manipulate the debt of a credit. Impact A malicious lender can use...

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

Line of credit status can be set to REPAID even if having credits with debt

Lines of code Vulnerability details A malicious borrower can close non-existing credits to alter the status of the credit to LineLib.STATUS.REPAID, even if having open credit with debt. Impact The close function in the LineOfCredit contract can be used to close non-existing credits, which will...

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

Use of .transfer()

Lines of code Vulnerability details Impact Note: I realize that this was flagged in the C4udit output, though it seems to believe that it's an ERC20 transfer. The use of transfer to send ETH only forwards 2300 gas to the recipient. This is not enough gas to execute a gnosis safe delegatecall. Fun...

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

Missing ReEntrancy Guard to sendOutTokenOrETH function

Lines of code Vulnerability details Proof of Concept There is no re-entry risk on true ERC-20 tokens that work according to the spec i.e. audited, etc.. However you can write a malicious ERC-20 with custom transferFrom or approve that have re-entrancy hooks to attack a target. Furthermore ERC-777...

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

SpigotLib._claimRevenue is marked public instead of internal

Lines of code Vulnerability details Impact SpigotLib.claimRevenue is marked public instead of internal. This public function is wrapped in the external claimRevenue function. Attacker can call claimRevenue to claim Revenue Tokens into the Spigot escrow for later withradrawal. Tools Used Manual...

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

Reentrancy in _close() allows single lender to steal all deposits from other lenders

Lines of code Vulnerability details Impact Upon calling close, a lender's credit position is deleted AFTER the transfer out of their deposit. Therefore, an ERC777 will allow the lender to call close again and receive the same amount of funds. The lender will be able to reenter the contract as man...

6.7AI score
Exploits0
Total number of security vulnerabilities10190