10190 matches found
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...
Using keccak256(abi.encoded()) can result in collisions
Lines of code Vulnerability details Proof of Concept The code in mutualConsent makes use of keccak256abi.encodePacked but this can result in a collision when the arguments of abi.encodePacked are aligned in a way that gives the same result. Impact Having hash collisions in mutualConsent...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 =...
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...
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...
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...
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...
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 ...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
_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...
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...
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...
Protocol won’t work with rebasing tokens
Lines of code Vulnerability details Proof of Concept Some tokens may make arbitrary balance modifications outside of transfers e.g. Ampleforth style rebasing tokens, Compound style airdrops of governance tokens, mintable / burnable tokens. If such a token as used, since in the protocol we cache t...
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...
Refinalization with theft of funds from other auctions
Lines of code Vulnerability details Vulnerability details Description There is a finalize function in the SizeSealed smart contract. The function traverses the array of the bids sorted by price descending. There is a prevention of the refinalization by the modifier atStateidToAuctionauctionId,...
Malicious seller can finalize his/her auction without changing data.lowestQuote , then auction's state will not be updated to States.finalized and this seller can repeat finalize or cancel auction to steal tokens from contract
Lines of code Vulnerability details Vulnerable details In contract, an auction's state will beStates.Finalized if data.lowestQuote of this auction is different from typeuint128.max. L33-34 data.lowestQuote is assigned to equal clearingQuote when seller finalize auction. L238 This value will be...
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...
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...
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...
Lack of notice period for critical operations
Lines of code Vulnerability details Impact All user assets can be locked or stolen. Proof of Concept All user assets can be locked or stolen if the L1ERC20Bridge or L1EthBridge is upgraded to a malicious contract. All user assets can be locked or stolen if governor is lost and...
Attacker can drain the SizeSealed.sol contract.
Lines of code Vulnerability details Impact An attacker can drain the SizeSealed.sol contract buy creating fake auction and manipulating some contract logic. POC Assuming that the SizeSealed.sol initially contains 10000 DAI tokens, I’ll demonstrate how an attacker can steal these tokens. The bug i...
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...
Use of abi.encodePacked on SizeSealed.computeMessage can cause auctions to never finalize
Lines of code Vulnerability details Impact The usage of abi.encodePacked on the SizeSealed.computeMessage function might cause an incorrect packing of baseAmount and the random salt for some specific combinations of bid/salt, which will cause SizeSealed.finalize to always revert with...
Cancel auction does not get deleted leading to loss of quoteTokens
Lines of code Vulnerability details Impact A malicious seller can cancel the auction just after it has ended, receive their baseToken back and then call reveal to make bidders lose their tokens which is sent to address0. Since a.data.lowestQuote == typeuint128.max just before reveal call is made,...
Seller can game the bidIndices[] in finalize()
Lines of code Vulnerability details Impact High bidders will be taken advantage of by malicious seller. It is likely that the high bidders will place bids above the market price, then the seller can effectively steal the price difference from them. And the other bidders are grieved, wasting time...
Denial of service from malicious bidder by filling up the bid index up until 1000
Lines of code Vulnerability details Impact Denial of service from malicious bidder by filling up the bid index up until 1000 Proof of Concept Initially inside bid function there is a check condition if bidIndex = 1000 then it will revert, so this will limit the size of bid created by bidder to...
Any use of fee-on-transfer tokens as quote tokens in auctions will result in freeze or loss of funds for users.
Lines of code Vulnerability details Description SIZE auctions do not support fee-on-transfer tokens. The platform rejects taxed baseToken during createAuction: // Passes https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.solL9 // Transfer base tokens to auction contrac...