Lucene search
K
Code423n4Recent

10190 matches found

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

Return value of ecMul() not checked in encryptMessage()

Lines of code Vulnerability details Impact ecMul returns 1,1 if failed or with invalid parameters. But encryptMessage does not check for the return value of ecMul. If there is mistake of the private key or public key, the encrypted message will be useless and potentially fail the auction. Proof o...

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

Attacker can take all the winnings and fill up the bids and cause loss of funds or dos

Lines of code Vulnerability details Impact Attacker can fill up all the bids and steal and be the winner and cause a dos and then withdraw/refund the funds since when doing a refund the bid isn't taken off the array an attacker can make 1000 bids and cause dos and have 100 percent chance of winni...

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

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...

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

Arbitrage Opportunity for Non-Sellers

Lines of code Vulnerability details Impact Non-sellers can flood the system with arbitrage auctions. Proof of Concept The seller can wait until 1 instant minute? before the end of the auction. Now the seller places a bid a couple percent above the current market price, enough to cover the seller'...

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

Bid can be cancelled after being finalized

Lines of code Vulnerability details Impact The SizeSealed contract's cancelBid function can be called after auction has been finalized, thereby allowing the bidder to withdraw their quoteToken after bid is finalized This is possible by bypassing the if a.data.lowestQuote != typeuint128.max ||...

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

Seller can steal all the bid fund by repeatedly calling finalize()

Lines of code Vulnerability details Impact Bidders' fund will be stolen by malicious seller, they can not get refund. Proof of Concept In finalize, FinalizeData memory data is local, which means in each call, data is re-initialized. By calling finalize multiple times, a malicious seller can get t...

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

[PNM-003] finalize can be called by bidders, allows them to cancelBid

Lines of code Vulnerability details Description The finalize function is used to finalize the auction, locking all bids, and paying the seller. However, any user, including bidders can call finalize, as it is a public function, and there are no user checks. This may allow bidders to input malicio...

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

A bidder can buy baseToken with low price by exploiting the DOS prevention measure

Lines of code Vulnerability details Impact In order to prevent DOS attacks, the smart contract introduces a measure that limits the number of bids on an auction SizeSealed.solL157-L159. However, an attacker/bidder can exploit this measure to block others to place bids so that the attacker can buy...

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

Denial of service when baseAmount is equal to zero

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. On each iteration, it calculates the quotePerBase. When this variable is calculated, the...

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

Low level call returns true if the address doesn’t exist

Lines of code Vulnerability details Impact the low-level functions call, delegatecall and staticcall return true as their first return value if the account called is non-existent, as part of the design of the EVM. Account existence must be checked prior to calling if needed. Proof of Concept...

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

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...

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

Unsafe cast blocks withdraw of tokens

Lines of code Vulnerability details Unsafe cast blocks withdraw of tokens Impact tokensAvailableAtTime is a internal function used by tokensAvailableForWithdrawal and this one being used internally also externally as it is public by withdraw method. cliffAmount is a uint256, being able to have mu...

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

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...

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

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...

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

baseToken AND quoteToken CAN BE THE SAME ERC20 TOKENS, RESULTING IN TRICKING BIDDERS TO LOSE THEIR TOKENS

Lines of code Vulnerability details Impact createAuction can be called by anyone to create auctions. One of the input parameter that this function requires is auctionParams. Since the createAuction function doesn't check that baseToken AND quoteToken are same or not, an Adversary can create an...

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

Malicious seller can steal from bidders.

Lines of code Vulnerability details Impact A seller can cancel the auction after finalize and thus can steal money from the bidders and get their original baseToken back. POC When an auction is started the value of a.data.lowestQuote is set as typeuint128.max here . In the atState function this...

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

Funds can be stolen

Lines of code Vulnerability details Impact For L2, any deposit finalization should come from L1 bridge address. Now the MailBox contract is currently helping to simulate such calls to be coming from L1. The problem is if within zkSync ecosystem, a contract is deployed with address same as L1 brid...

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

msg.sender token balance is not checked before calling safeTransferFrom function

Lines of code Vulnerability details Impact createAuction FUNCTION and bid FUNCTION: Without checking the msg.sender token balance the transfer function may be failed to transfer token from msg.sender to contract address . this may cause a transactions failures. Same instance in 2 times PROOF OF...

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

Attacker can steal any funds in the contract by state confusion (no preconditions)

Lines of code Vulnerability details HIGH: Attacker can steal any funds in the contract by state confusion no preconditions LOC: Description Auctions in SIZE can be in one of several states, as checked in the atState modifier: modifier atStateAuction storage a, States state if block.timestamp...

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

seller can change lowestBaseand lowestQuote and the seller can make it diffrent values causing a dos or loss of funds

Lines of code Vulnerability details Impact When I a seller finalizes the auction they change the lowestQuote and lowestBase.When users withdraw from the auction after the auction is finalized. QuoteBought is calculated with the new amounts which can cause dos or refund their leftover quote amount...

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

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,...

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

Wrong bidIndex calculation

Lines of code Vulnerability details Impact Return wrong bidIndex Proof of Concept SizeSealed.sol Tools Used Manual Recommended Mitigation Steps uint256 bidIndex = a.bids.length - 1 ; --- The text was updated successfully, but these errors were encountered: 👎 1 trust1995 reacted with thumbs down...

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

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...

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

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,...

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

Seller can stole users assets by create and then cancel the auction

Lines of code Vulnerability details Impact Seller can stole users assets by create and cancel auction Proof of Concept Seller can create an auction, then wait for people to participate in auction bidding, finally the seller cancel the auction and get the users assets. This scenario can happen wit...

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

Some cases maybe cause the bids unable to get their funds back.

Lines of code Vulnerability details Impact All of the following there cases maybe cause the bids unable to get their funds back. Details case1: If sellerwho is a bad man does not reveal in the reveal period, then all the bids will be unable to get their funds back. case2: If sellerwho is a bad ma...

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

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...

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

Contracts will not working correctly after February 2106. Vesting will be locked forever if withdrawn after February 2106.

Lines of code Vulnerability details Impact Contracts will not working correctly after February 2106. Migration takes costs and is risky. You shouldn't pass on this work to future programmers. You should fix it in the first place. In case anything went wrong during migration, a big fund loss will...

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

Casting to uint128 when valiue can exceed uint128.max

Lines of code Vulnerability details Impact In CommonTokenMath.tokensAvailableAtTime the result is cast to uint128 on line 62. Given that baseAmount close or at it's uint128.max, and cliffPercent is close or at it's max of 1e18 dictated on line 72 in SizeSealed.sol, cliffAmount can reach uint128.m...

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

Bidder can steal all the base token by repeatedly calling finalize()

Lines of code Vulnerability details Impact All the base token will be stolen by malicious bidder, even worse the bidder might pay nothing at the end. Proof of Concept Anyone can call finalize, and it can be called multiple times. FinalizeData memory data is local, which means in each call, data i...

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

Auction can be DoS-ed with too many bids

Lines of code Vulnerability details Proof of Concept The bid functionality pushes every new bid to the a.bids array. On finalize this array is looped over. Now, if there are too many bids in it, the for loop gas consumption will go over the block gas limit, which is 30M gas units currently. The...

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

Quotetoken can be address(0) or any EOA and still allow auctions and bids to be created

Lines of code Vulnerability details Impact createAuction in SizeSealed.sol performs no validation of the auction parameters AuctionParameters sent to it and will allow a Seller to create an auction with an ERC20 quoteToken of address0 putting at risk the baseToken that has real value. In addition...

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

Some bidders can withdraw would claim moreof the baseToken when auction CliffPercent value is 1

Lines of code Vulnerability details Impact If an auction is created with a.timings.cliffPercent set to 1 , then during withdrawal of baseTokens after auction ends, the some bidders to withdraw would claim more tokens than others of the baseToken amounts. Proof of Concept 1. Auction A is created...

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

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...

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

Can't cancel bid when in the reveal period.

Lines of code Vulnerability details Impact Expected: Only allow bid cancellations while not finalized or in the reveal period. Actual: Can't cancel bid when in the reveal period. Recommended Mitigation Steps Change the code in to if a.data.lowestQuote != typeuint128.max || block.timestamp...

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

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...

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

Rebasing tokens as Base tokens for the auction could be stuck in the contract or mean loss of funds for the las person to withdraw

Lines of code Vulnerability details Impact Use of rebasing tokens is not checked and could result it stuck funds, inability to cancel an Auction or withdraw due amounts of base token for the last one to call withdraw Proof of Concept If a rebasing token is used for the base token the balance held...

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

Filling all auction slots to win the auction

Lines of code Vulnerability details Vulnerability details Description The number of bids for one auction is limited to 1000. It means that someone may make all 1000 bids and thus invalidate all other bids. Therefore, a malicious user can win the auction with the minimum possible bid. It may seem...

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

Asymmetric level of transaction validation between L1 side and L2.

Lines of code Vulnerability details Impact May have double counting of deposits? Proof of Concept On L1 side, there are validations that ensure funds don't get lost nor double counted. For example, finalizeWithdrawal may be called multiple times by allowed callers in case previous calls fail...

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

Add chainId to address creation.

Lines of code Vulnerability details Impact Although it may not be in the plan to deploy multiple zkSync rollups, it makes sense to include chainid in computeCreate2Address from the very start. It would be more EIP-155 compliant, and will prevent future replay attacks, where a tx of first zkSync...

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

Bridge should not allow ERC20 tokens with double-entry point

Lines of code Vulnerability details Impact If a token with double-entry point is escrowed in L1 bridge, the user could withdraw their token through the other entry point, thus rugpulling the bridge. And when they actually withdraw from L2, they will take other users' funds from the bridge. Proof ...

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

Cross-chain replay attacks are possible with create2()

Lines of code Vulnerability details Impact Mistakes made on one chain can be re-applied to a new chain There is no chain.id in the create2 function data If a user does create2 using the wrong network, an attacker can replay the action on the correct chain, and steal the funds a-la the wintermute...

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

Hacker can front-run the L2 ERC20 token deployment.

Lines of code Vulnerability details Impact hacker can front-run the L2 ERC20 token deployment to block L2 ERC20 token finalizeDeposit Proof of Concept I intend to prove this piece of code is front-runnable by hacker: /// @notice Finalize the deposit and mint funds /// @param l1Sender The account...

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

Same function

Lines of code Vulnerability details Both functions do the same thing, while logically one of the functions should be for layer one and the other function should be in layer two to perform the same operation. --- The text was updated successfully, but these errors were encountered: All reactions...

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

Upgraded Q -> M from 16 [1667781797574]

Judge has assessed an item in Issue 16 as Medium risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...

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

Upgraded Q -> M from 133 [1667781432368]

Judge has assessed an item in Issue 133 as Medium risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...

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

Aliasing L1 sender on L2

Lines of code Vulnerability details Impact If a contract on L1 has the same address as a contract on L2 but doesn't have the same code, we will have a critical issue, as funds will be lost. Proof of Concept Both Optimism and Arbitrum implements applyL1ToL2Alias / undoL1ToL2Alias logic to prevent ...

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

No incentive mechanism for allowed senders to call finalizeWithdrawal on behalf of withdrawers.

Lines of code Vulnerability details Impact Since finalizeWithdrawal is a permissioned function, if there are no mechanism in place for allowed senders to trigger it, withdrawers would not able to receive their funds in a timely fashion. Proof of Concept The withdrawal functions such...

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

Upgraded Q -> H from 486 [1667781140997]

Judge has assessed an item in Issue 486 as High risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...

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

L2ETHBridge.l2TokenAddress returns CONVENTIONAL_ETH_ADDRESS instead of ETH_TOKEN_SYSTEM_CONTRACT_ADDRESS

Lines of code Vulnerability details Impact In the L2ETHBridge contract, both the withdraw and l2TokenAddress functions use CONVENTIONALETHADDRESS as the address of the L2ETH. However, L2ETH is actually an L2StandardToken contract at the ETHTOKENSYSTEMCONTRACTADDRESS address. If the user wants to...

6.9AI score
Exploits0
Total number of security vulnerabilities10190