Skip to content
Business logic Audit finding Intermediate

Attacker can delay proposal rejection

The rejectProposal function reverts if the proposed listing's collateral is less than the amount being rejected. An attacker can front-run a rejection transaction by reducing the collateral to one unit less than the amount, causing the rejection to fail and delaying it until the proposal period ends.

gzeon Follow

Originally disclosed on Code4rena

Submitted by gzeon

In OptimisticListingSeaport.rejectProposal, it reverts if proposedListing.collateral < _amount. An attacker can therefore monitor the mempool, reducing the proposedListing.collateral to _amount - 1 by frontrunning the rejectProposal call and delaying the rejection. The attacker may even be able to deny the rejection when the deadline passes.

https://github.com/code-423n4/2022-12-tessera/blob/f37a11407da2af844bbfe868e1422e3665a5f8e4/src/seaport/modules/OptimisticListingSeaport.sol#L145

        if (proposedListing.collateral < _amount) revert InsufficientCollateral();

https://github.com/code-423n4/2022-12-tessera/blob/f37a11407da2af844bbfe868e1422e3665a5f8e4/src/seaport/modules/OptimisticListingSeaport.sol#L153

        proposedListing.collateral -= _amount;

Proof of Concept

  1. Attacker proposes a 10000 collateral at a very low price
  2. Bob tries to reject it by purchasing the 10000 collateral
  3. Attacker sees Bob’s tx in the mempool, frontruns it to reject 1 unit
  4. The proposedListing.collateral is now 9999
  5. Bob’s call reverted
  6. This keeps happening until PROPOSAL_PERIOD passes or Bob gave up because of gas paid on failing tx
  7. Attacker buys the NFT at a very low price

Recommended Mitigation Steps

When proposedListing.collateral < _amount, set \_amount to proposedListing.collateral and refund the excess.

stevennevins (Tessera) disagreed with severity and commented:

While annoying, I think this is a Medium severity issue. The attacker has to under price their proposal, defend this under priced proposal from other users and front run each purchase > 1, while selling their Raes at a loss, and it would be relatively costly for griefer to defend their underpriced proposal for the duration of the proposal period. Users could purchase 1 Rae at a time without risk of front running.

HickupHH3 (judge) decreased severity to Medium and commented:

Agree with Medium severity given the external requirements needed to pull this off.


The original report as published on Code4rena, by gzeon. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The rejectProposal function requires the collateral to be at least the amount being rejected, but an attacker can reduce the collateral by a small amount just before the rejection, causing it to revert.

Impact

The attacker can delay or prevent the rejection of an underpriced proposal, potentially buying the NFT at a very low price, though the attack requires external conditions and may be costly.

What the attacker needed

Attacker can propose a listing; attacker can front-run transactions; victim attempts to reject

The fix

When the collateral is less than the amount, set the amount to the collateral and refund the excess.

How it was found

  1. Attacker proposes a 10000 collateral at a very low price
  2. Bob tries to reject it by purchasing the 10000 collateral
  3. Attacker sees Bob’s tx in the mempool, frontruns it to reject 1 unit
  4. The proposedListing.collateral is now 9999
  5. Bob’s call reverted
  6. This keeps happening until PROPOSAL_PERIOD passes or Bob gave up because of gas paid on failing tx

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When someone tries to reject a bad proposal by buying back the collateral, the attacker quickly makes a small change so the rejection fails. This is like someone constantly moving a finish line just before you cross it, so you can never complete the rejection.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by gzeon

View all

46 more disclosed reports, best first.

More from Tessera - Versus contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.