Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/11/10 12:0 a.m.•8 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.•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

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.•7 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.•6 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.•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.•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.•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
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.•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.•7 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.•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.•6 views

State varaible marketplace has never been initialized in LooksRareProxy.sol

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. State varaible marketplace has never been initialized in LooksRareProxy.sol. Although it has been initialized in the constructor, it won't count since functions such as execute will only be called via...

7AI 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.•9 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/09 12:0 a.m.•11 views

L1ERC20Bridge does not have an emergency stop mechanism to pause the bridge in case of any problems found.

Lines of code Vulnerability details Impact Right now, L1ERC20Bridge implements nonReentrant and access control mechanism to improve security. However, there is not any emergency stop mechanism that can be triggered by an authorized account to pause the bridge in case of some problems. It is highl...

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

No Checks On Withdraw Function For _amount

Lines of code Vulnerability details Impact If bridgeburn function is a faulty function or a contract that uses older version of solidity the variable the balance may overflow due to lack of checks. Proof of Concept In the function there should be a check balanceOfmsg.sender=amount to mitigate...

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

uint16 type for the facet position and selector position

Lines of code Vulnerability details Description In the Diamond library there is uint16 type used for the facet position and selector position in the FacetToSelectors and SelectorToFacet structs. That creates a restriction that the number of facets is limited by 2^16. In case when the number of...

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

Uninitializing Bridge Contracts' State Variables

Lines of code Vulnerability details Vulnerability Details The L1ERC20Bridge and L1EthBridge are implementation contracts that would be delegatecalled by their corresponding proxy contracts. In other words, all state variables and assets would be stored in the proxy contracts. In contrast, the...

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

No commitment to data passed as input to the init contract during the execution of the diamond cut proposal

Lines of code Vulnerability details Description There is a function executeDiamondCutProposal in the DiamondCutFacet contract. It checks that proposal data passed as input to this call is equal to the data that is declared when the creation of this proposal using the following logic: require...

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

No Allowlist For Bridgeable ERC-20 Tokens

Lines of code Vulnerability details Vulnerability Details We noticed that the deposit function of the L1ERC20Bridge contract code snippet 1 permits a user to bridge any ERC-20 tokens including deflationary and rebase tokens from the L1 to the L2 network. We considered that permitting non-standard...

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

Governor ownership can be lost because of not sanity check

Lines of code Vulnerability details Governor ownership can be lost because of no checks Impact Sanity checks are important to not affect reputation / flows and users of the protocol when a mistake is done. 0 address should be checked for important address assignments in this case, only done in th...

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

Mssing Crucial Checks When Unlocking funds for Withdraw Requests from L2

Lines of code Vulnerability details Impact Atomicity literally does not exist when users from L2 initiate a withdrawal by burning funds on the contract and sending the message to L1. This is giving malicious attackers plenty of time to stealthily launch a series of small and yet sizable forgery o...

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

BLOCK_PERIOD is incorrect

Lines of code Vulnerability details The BLOCKPERIOD is set to 13 seconds in Config.sol. uint256 constant BLOCKPERIOD = 13 seconds; Since moving to Proof-of-Stake PoS after the Merge, block times on ethereum are fixed at 12 seconds per block slots. . Impact This results in incorrect calculation of...

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

Potential DoS in unbounded for loop

Lines of code Vulnerability details Proof of Concept The function facets in Getters.sol iterates over the DiamondStorage facets array. In Diamond.sol we can see that by calling diamondCut in a way that saveFacetIfNew gets called, the diamond owner can add an indefinite amount of entries. If this ...

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

No sanity check on _l1Token can lead into a bad deployment on the bridge

Lines of code Vulnerability details No checks on l1Token can lead into a bad deployment on the bridge Impact deployL2Token calls bridgeInitialize which is only callable one time for token as it uses initializer modifier. There are no checks for 0 address which can be assigned by error as it is a...

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

1) THERE IS CONFLICT IN REQUIRE STATMENT. IN finalizeDeposit FUNCTION CHECKS require (msg.sender == l1Bridge, "mq"). IN bridgeMint FUNCTION IMPLEMENTATIONS onlyBridge Modifier CHECKS require(msg.sender == l2Bridge).

Lines of code Vulnerability details 1. Impact Let assume if we calling bridgeMint from finalizeDeposit function the msg.sender is l1bridge . if the msg.sender is not l1bridge can't run the finalizeDeposit but as per bridgeMint the msg.sender should be l2bridge. So it will cause the conflict . the...

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

_safeMint should be used to work with smart contract address

Lines of code Vulnerability details Fix safeMint should be used if you are sending the minted token to a Contract that is capable to manage NFTs or not. This is to prevent tokens to be lost. Recommended Mitigation Steps Replace mint with safeMint. Tools Used Manual review --- The text was updated...

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

WHEN EVER CALLING bridgeMint OR bridgeBurn FUNCTIONS NEED TO CHECK THE STATUS OF THE TRANSACTIONS

Lines of code Vulnerability details Impact If not checking the status of the bridgeMint and bridgeBurn functions we don't know the the transactions are success or not. If function breaks any of the reasons we don't what happened and what is the status of the transactions. there is no solutions...

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

L2 deposits might be reverted

Lines of code Vulnerability details Impact L1ERC20Bridge and L1EthBridge contracts have claimFailedDeposit function to withdraw funds from the initiated deposit, which failed when finalizing on L2. However, if the caller is allowed in senderCanCallFunction modifier, this function can be used to...

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

Validator can revert block at no cost.

Lines of code Vulnerability details Impact Validator can revert block at no cost. Proof of Concept the validator should only call this function on Executor.sol to revert the unexecuted blocks if the block is not really not executable. /// @notice Reverts unexecuted blocks /// @param newLastBlock...

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

ERC20 and ETH might be returned back to the wrong originator

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Assume the address of erc20EnabledLooksRareAggregator was maliciously changed to fakeerc20EnabledLooksRareAggregator during an execution of LooksRareAggregator.execute then, the malicious user might for...

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

Not possible to DiamondCut in frozen status

Lines of code Vulnerability details Impact DiamondCut's executeDiamondCutProposal executes the proposed diamondCut calldata in the Diamond is unfrozen condition. However, if there are any possible situations that require restriction implementation in which the upgrade should be executed in a froz...

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

Unsafe Initializations Of Bridge Contracts

Lines of code Vulnerability details Vulnerability Details During the zkSync initialization process, several complicated tasks would be required to execute. Incorrect configurations in some tasks could lead to unexpected vulnerabilities. One task of the zkSync initialization process is deploying a...

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

SizeSealed.withdraw will revert on mulDivDown if a.data.lowest is the value zero, which can prevent withdraws for an auction

Lines of code Vulnerability details Proof of Concept The call to mulDivDown on L377 will revert if the third argument denominador is the value zero. See Solmate implementation. It's possible for a.data.lowestBase to receive the value zero, which will prevent the transfers from L381 and L384. Impa...

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

Solmate's safeTransfer function does not check the existence of the contract

Lines of code Vulnerability details Impact Miscalculation of transferred funds and finally, loss of funds Proof of Concept Solmate's safeTransfer and safeTransferFrom functions do not check the ext code size of the address of the recipient and so, it may lead to a miscalculation of funds as it...

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

Bidder can abuse the bidIndices[] in finalize()

Lines of code Vulnerability details Impact finalize could be called by anyone, and the input array bidIndices is not sanity checked. Some malicious bidder can trick the bidIndices to always get the reserveQuotePerBase price. The seller would incur some loss. The other bidders are grieved, wasting...

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

Multi Step upgrades introduce security risk

Lines of code Vulnerability details Impact If Governor upgrades the system using executeDiamondCutProposal function then freezing is removed. This could be a problem where Governor was still not ready to make freezable facet available as shown in POC Proof of Concept 1. Governor discovers a...

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

VARIABLE BALANCE TOKEN ASSOCIATED WITH LOSS AND LOCKING OF FUNDS

Lines of code Vulnerability details Impact ERC20 tokens that are either deflationary or re-basing down could have their respective balance change. The balance could become insufficient at the time of withdraw, refund or cancel to the bidders whose funds will be locked due to DOS. The way to take...

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

Solmate's SafeTransferLib won't check if token has code, which can affect transfers in SizeSealed

Lines of code Vulnerability details Impact Not checking for token existence is a know issue for Solmate. This can cause unexpected contract functionality for transfers implemented in SizeSealed. Note that this might not be a problem for baseToken due to the check implemented in L103. However, thi...

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

Draining baseToken from contract by calling finalize function multiple times

Lines of code Vulnerability details Impact Draining baseToken from SizeSealed contract by calling finalize function multiple times Proof of Concept The finalize function can be called multiple times by providing clearingQuote to typeuint128.max. Currently inside finalize function there is no chec...

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

Solmate safetransfer and safetransferfrom doesnot check the codesize of the token address, which may lead to fund loss

Lines of code Vulnerability details Impact In bid function, the safetransferfrom function doesn't check the existence of code at the token address. This is a known issue while using solmate's libraries. Hence this may lead to miscalculation of funds and may lead to loss of funds , because if...

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

[PNM-001] finalize with malicious input may allow multiple calls leading to fund draining

Lines of code Vulnerability details Description The finalize function of the contract SizeSealed is used to finalize an auction, allowing the auctioner or seller to be paid quote tokens and also eventually allowing successful bidders to withdraw base tokens. Once the finalize function is called,...

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

A total of 3 risks: one with imperfect concurrency judgment logic, one with unrobust business logic, and one with unreasonable timestamp settings

Lines of code Vulnerability details RISK 1: When creating an auction, if the exact same token is transferred to the contract in a very short period of time, it will cause one of the auctions to fail to be created. is caused by the following statement: if balanceAfterTransfer - balanceBeforeTransf...

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

[PNM-002] finalize with malicious input may lock bidder funds in the contract

Lines of code Vulnerability details Description The finalize function of the contract SizeSealed is used to finalize an auction, allowing the auctioner or seller to be paid quote tokens and also eventually allowing successful bidders to withdraw base tokens. Once the finalize function is called,...

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

Providing the same address for the "base" and the "quote" tokens creates a risk of fund loss for the seller.

Lines of code Vulnerability details Impact The "createAuction" function requires the seller to input the address of a base and a quote token. However, there is no statement that checks whether or not these two provided addresses are the same. As a result, the seller could accidentally fill in an...

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

Reentrancy in createAuction() function

Lines of code Vulnerability details Impact Some ERC20 tokens missing return values and don't fail in case of an unsuccessful transfer. Also, ERC777 tokens could call the tokens receivers during the transfer. If baseToken would be such a token that combines both properties - this could lead to a...

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

Front-running of bid calls

Lines of code Vulnerability details Description There is bid function in the SizeSealed contract. The function accepts the auctionId, which does not contain any information about the auction itself. As a result, transactions of users can be front-runned to enforce them bid for the auction with th...

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

quoteToken could be fee-on-transfer token

Lines of code Vulnerability details Impact Some ERC20 tokens could have fees for each transfer, they are known as "fee-on-transfer" tokens. While there is a check inside createAuction function that prevents these tokens from being baseToken, FoT tokens still allowed to be quoteToken which could...

6.6AI score
Exploits0
Total number of security vulnerabilities10190