Attacker can force AuctionCrowdfunds to bid their entire contribution up to maxBid
The bid() function in AuctionCrowdfund only prevents the party from bidding if it is already the highest bidder, but does not stop an attacker from placing a bid from their own wallet and then immediately overbidding with the party's funds. This allows an attacker to force the party to pay up to maxBid for an NFT, even if it could have been bought for much less.
Submitted by Trust, also found by cccz
AuctionCrowdfund’s bid() allows any user to compete on an auction on the party’s behalf. The code in bid() forbids placing a bid if party is already winning the auction:
if (market.getCurrentHighestBidder(auctionId_) == address(this)) {
revert AlreadyHighestBidderError();
}
However, it does not account for attackers placing bids from their own wallet, and then immediately overbidding them using the party’s funds. This can be used in two ways:
- Attacker which lists an NFT, can force the party to spend all its funds up to maxBid on the auction, even if the party could have purchased the NFT for much less.
- Attackers can grief random auctions, making them pay the absolute maximum for the item. Attackers can use this to drive the prices of NFT items up, profiting from this using secondary markets.
Impact
Parties can be stopped from buying items at a good value without any risk to the attacker.
Proof of Concept
- Attacker places an NFT for sale, valued at X
- Attacker creates an AuctionCrowdfund, with maxBid = Y such that Y = 2X
- Current bid for the NFT is X - AUCTION_STEP
- Users contribute to the fund, which now has 1.5X
- Users call
bid()to bid X for the NFT - Attacker bids for the item externally for 1.5X - AUCTION_STEP
- Attacker calls
bid()to bid 1.5X for the NFT - Attacker sells his NFT for 1.5X although no one apart from the party was interested in buying it above price X
Recommended Mitigation Steps
Introduce a new option variable to AuctionCrowdfunds called speedBump. Inside the bid() function, calculate seconds since last bid, multiplied by the price change factor. This product must be smaller than the chosen speedBump. Using this scheme, the protocol would have resistance to sudden bid spikes. Optionally, allow a majority funder to override the speed bump.
merklejerk (PartyDAO) acknowledged and commented:
This is a known limitation of crowdfunds. We will allow some parties to restrict who can call
buy()orbid()to hosts, which will mitigate this.
HardlyDifficult (judge) commented:
This is a fair concern, a form of potentially leaking value so agree with Medium risk. Not sure I agree with the recommendation here, but restricting to hosts does help mitigate by putting risk on the attacker.
0xble (PartyDAO) confirmed and resolved:
Mitigated by: https://github.com/PartyDAO/partybidV2/pull/140
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
Impact
Parties can be stopped from buying items at a good value without any risk to the attacker.
What the attacker needed
Attacker lists an NFT; attacker creates an AuctionCrowdfund; users contribute to the fund; attacker has funds to bid externally
The fix
The issue was mitigated by restricting who can call bid() to hosts, as confirmed by the project.
How it was found
- Attacker places an NFT for sale, valued at X
- Attacker creates an AuctionCrowdfund, with maxBid = Y such that Y = 2X
- Current bid for the NFT is X - AUCTION_STEP
- Users contribute to the fund, which now has 1.5X
- Users call bid() to bid X for the NFT
- Attacker bids for the item externally for 1.5X - AUCTION_STEP
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.
A crowdfund lets a group pool money to buy an NFT. The bid function lets anyone bid on the group's behalf, but it only checks if the group is already winning. An attacker can bid from their own wallet, then immediately bid again using the group's money, forcing the group to pay more than necessary.
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.