# Attacker may DOS auctions using invalid bid parameters

Unvalidated bid pubKey/commitment/baseAmount let an attacker submit 1000 invalid bids that finalize skips, filling the bid cap and blocking legitimate bids.

- Payout: Contest reward
- Severity: medium
- Program: SIZE
- Credited: Trust
- Disclosed: 2023-01-09
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2022-11-size-findings/issues/237
- Library page: https://bugbountylibrary.com/r/c4%3A2022-11-size%3AM-06
- Tags: domain:web3 impact:dos kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic vuln:dos

**Target:** SizeSealed auction contract bid()/finalize()
**Root cause:** finalize() silently `continue`s on bids whose pubKey is (0,0), commitment is zero, or baseAmount is 0 (quotePerBase=0), but these bids still count toward the 1000-bid cap, so invalid bids crowd out valid ones.
**Steps:**
1. Attacker calls `bid()` 1000 times with `pubKey=(0,0)` (ecMul returns (1,1) → continue) or zero commitment, or encrypted `baseAmount=0` making `quotePerBase=0 < reserveQuotePerBase` → continue.
2. Each bid consumes a slot in the per-auction 1000-bid cap.
3. Legitimate buyers can no longer submit bids; finalize skips all attacker bids.
4. Attacker recovers locked quote via `refund()` after auction.
**How found:** Code review of finalize loop: noticed pubKey never validated and ecMul returns (1,1) for (0,0), plus zero commitment and zero baseAmount paths all hit `continue` while still counting toward the bid cap.
**Exploitation:** Attacker locks minimumBidQuote*1000 tokens for auction duration, submits 1000 invalid bids to exhaust the bid cap, denying legitimate participation; funds refunded afterward.
**Insight:** When a loop caps entries to bound gas, check whether entries that get skipped/continued still consume the cap — cheap-to-create invalid entries become a griefing vector even if individually harmless.
