Lucene search
+L
Code423n4Recent

10190 matches found

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

Native funds on the aggregator contract balance is a free grab

Lines of code Vulnerability details Native funds on the aggregator contract balance is a free grabLooksRareAggregator's execute returns the native balance of the contract to the caller even when nothing was provided with the call. This happens when LooksRareAggregator's execute is called directly...

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

LowLevelETH: _returnETHIfAny; _returnETHIfAny; _returnETHIfAnyWithOneWeiLeft do not check if call was successful

Lines of code Vulnerability details Impact This means that the caller won't receive ETH but the transaction will continue, this could specially affects to function LookRareAggregator.execute, which use returnETHIfAnyaddress function, leading to originator lose of funds or mess up its state...

7.1AI 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.13 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.8 views

Pulling user's ERC20 tokens to Contract LooksRareAggregator requires approvals from the user

Lines of code Vulnerability details Impact Contract ERC20EnabledLooksRareAggregator pulls user's ERC20 tokens to Contract LooksRareAggregator without pre-approvals from the user. This will prohibit the token transfer unless somewhere else the approvals have been done e.g. before calling the...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/11/13 12:0 a.m.13 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/13 12:0 a.m.9 views

ETH could be locked in LooksRareAggregator

Lines of code Vulnerability details Impact ETH is returned to originator at the end of function LooksRareAggregatorexecute.... However, this logic does not check for returned value from originator in case originator is a contract and reverts when receiving ether. The result is that the transactio...

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

ETH amount that is trapped in LooksRareAggregator contract can be withdrawn by user who is not LooksRareAggregator's owner

Lines of code Vulnerability details Impact When ETH amount is trapped in the LooksRareAggregator contract, such as when someone accidentally sends some ETH to it, the owner of the LooksRareAggregator contract has the privilege to call the rescueETH function to transfer such amount to a proper...

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

Tokens and ETH can be sweeped from LooksRareAggregator

Lines of code Vulnerability details Impact Tokens and ETH can be sweeped from LooksRareAggregator Proof of Concept A malicious user may transfer out any tokens or ETH that are owned by LooksRareAggregator. To do so, a such user has to call execute - and make the trade. After executing of order...

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

User can drain all ether from LooksRareAggregator contract

Lines of code Vulnerability details Impact Anyone could drain all ether from this contract. Proof of Concept function execute TokenTransfer calldata tokenTransfers, TradeData calldata tradeData, address originator, address recipient, bool isAtomic external payable nonReentrant if recipient ==...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/11/13 12:0 a.m.11 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/12 12:0 a.m.11 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.8 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.12 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.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.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/12 12:0 a.m.13 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/11 12:0 a.m.5 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.48 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/11 12:0 a.m.15 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.10 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/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.10 views

Borrower can manipulate the repayment queue, avoid paying back the initial lender

Lines of code Vulnerability details Impact In contract LineOfCredit, the repayment queue protects lenders and assured that they have to get paid back. Without a queue, a borrower could constantly refinance to lower rates and avoid paying back the initial lender from sponsors. Every time, borrower...

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

Borrower can close non-existent credit line positions to effectively force the overall status to REPAID

Lines of code Vulnerability details The LineOfCredit.close function is used to close a credit line position. Both the lender of a specific credit position and the borrower can call this function. However, the function does not check if the given id belongs to a credit line position in the credits...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.10 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
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.9 views

Repaying a line of credit with a higher than necessary claimed revenue amount will force the borrower into liquidation

Lines of code Vulnerability details A borrower can repay parts of a credit line with the SpigotedLine.useAndRepay function. This function will use amount of unusedTokenscredit.token as a repayment. However, if amount exceeds the principal and the accrued interest, credit.principal will underflow...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.3 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.9 views

Oracle’s price is not checked for staleness

Lines of code Vulnerability details Proof of Concept The code makes use of Chainlink’s latestRoundData method but it does no validations on the input from it. The protocol has handling for price that is negative or zero in the methods that call getLatestAnswer but it is missing a check for...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.10 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.6 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.6 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.9 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.19 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.11 views

Borrower can put their address when submiting addCredit() which can make the lender not be able to withdraw tokens

Lines of code Vulnerability details Impact when calling addCredit by borrower, they can choose to put in their address as the lender instead of the actuall lender. this can bring problems later on when the lender is trying to withdraw funds from the contract. they wont be able to withdraw the fun...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.14 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.14 views

SpigotedLineLib::trade won’t work with tokens with approval race protection (USDT)

Lines of code Vulnerability details Proof of Concept Some tokens e.g. USDT, KNC do not allow approving an amount M 0 when an existing amount N 0 is already approved. This is to protect from an ERC20 attack vector described here. The problem is the code in trade is the following...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.9 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.8 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.11 views

Closing an unexisting credit can overflow the credit count variable in the LineOfCredit contract

Lines of code Vulnerability details The LineOfCredit contract doesn't verify if a credit exists and is properly initialized when closing it, and will update its state anyway, leading to an inconsistent count. Impact The close function in the LineOfCredit contract doesn't check if the given credit...

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

LineLib.sendOutTokenOrETH() may not be compatible with contract receiver because of use of transfer()

Lines of code Vulnerability details Impact LineLib.sendOutTokenOrETH may revert when its receiver is a contract, preventing it from receiving ETH, and thus from much of the functionality of the protocol. Proof of Concept LineLib.sendOutTokenOrETH is as follows. / @notice - Send ETH or ERC20 token...

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

Logic in LineLib does not work correctly with fee-on-transfer tokens

Lines of code Vulnerability details Proof of Concept Some tokens take a transfer fee e.g. STA, PAXG, some do not currently charge a fee but may do so in the future e.g. USDT, USDC. The code currently receives ERC20 tokens but does not account for the potential fees paid in the transfer. If such a...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.10 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.5 views

LineLib.receiveTokenOrETH() can accept more ETH than it accounts for

Lines of code Vulnerability details Impact LineLib.receiveTokenOrETH can receive ETH and accounts for an amount to receive but it is possible to send more ETH than amount, meaning that any extra ETH sent will be lost to the contract. Proof of Concept LineLib.receiveTokenOrETH is as follows...

6.8AI 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.9 views

Unlimited length of LineOfCredit.ids: out of gas

Lines of code Vulnerability details Impact There are no restrictions for ids length But there are many loops through ids. So if length will be bigger then some max value, loops may fail because of consuming all gas Proof of Concept Functions LineOfCredit.updateOutstandingDebt and...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.14 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.8 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.9 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.11 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.9 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
Total number of security vulnerabilities10190