# EIP-712 signatures can be re-used in private sales

Foundation private-sale EIP-712 signatures lacked replay protection, letting a prior buyer re-purchase the same NFT at the old price if the seller reacquired it.

- Payout: Audit contest
- Severity: medium
- Program: Foundation
- Found by: thankthedark
- Disclosed: 2022-05-19
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2022-02-foundation-findings/issues/68
- Library page: https://bugbountylibrary.com/r/c4%3A2022-02-foundation%3AM-01
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:signature-replay

**Target:** NFTMarketPrivateSale.buyFromPrivateSaleFor (Solidity/EVM marketplace)
**Root cause:** buyFromPrivateSaleFor validates signature, deadline (<=48h), and price but never marks the signature/terms as consumed, so identical signed terms remain valid until expiry.
**Steps:**
1. Seller signs EIP-712 private-sale terms (nftContract, tokenId, buyer, seller, amount, deadline) and gives v,r,s to buyer.
2. Buyer calls `buyFromPrivateSaleFor(...)` with the signature; NFT transfers at agreed price.
3. Seller later reacquires the NFT and relists it.
4. Original buyer replays the same `buyFromPrivateSaleFor` call with identical params before the deadline; signature still validates and NFT transfers again at the stale price.
**How found:** Code review of buyFromPrivateSaleFor's validation list (expiry, deadline, msg.value bounds, signer recovery) revealed no nonce or used-signature tracking, prompting the replay scenario.
**Exploitation:** A prior buyer retains the seller's signature and, after the seller reacquires and relists the NFT (potentially at higher value), replays the original call within the <=48h window to buy at the old, lower price.
**Insight:** When auditing signature-gated purchase/claim functions, enumerate every validation and confirm one of them binds the signature to single use (nonce or consumed-terms mapping); expiry windows alone are not replay protection.
