Reproduced Exploit
Term Finance: a reopened auction never receives AUCTION_LOCKER, so 4,000 collateral stays locked
Chain
Other
Category
access-control
Date
Apr 2023
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 26299-insufficient-permissions-granted-to-new-auctions-sigmaprime. Standalone Foundry PoC and full write-up: 26299-insufficient-permissions-granted-to-new-auctions-sigmaprime_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/access-control/missing-auth · vuln/dos/frozen-funds
Reproduction: local synthetic, no fork.
reopenToNewAuctionlinks the new auction and does not grantAUCTION_LOCKER. A 4,000 collateral bid cannot be settled or refunded. Trace: output.txt.
Key info#
| Impact | HIGH — 4,000 collateral is stuck in the new auction |
| Protocol | Term Finance — TermRepoCollateralManager.reopenToNewAuction |
| Vulnerable code | the new auction is stored and AUCTION_LOCKER is not granted |
| Bug class | Missing role on a reopened auction |
| Finding | Sigma Prime, Term Finance contracts, April 2023 · TRM-10 |
| Report | sigp/public-audits term1 review |
Root cause#
auctionLockCollateral and auctionUnlockCollateral are onlyRole(AUCTION_LOCKER). The initial pairing grants that role to the auction. reopenToNewAuction replaces the auction and, in the audited code, does not:
function reopenToNewAuction(address auction) external onlyRole(DEFAULT_ADMIN_ROLE) {
// @> VULN: the new auction is linked and never receives AUCTION_LOCKER
currentAuction = auction;
}
A bidder can still escrow collateral in the new auction contract. Completing the auction calls auctionLockCollateral. Refunding calls auctionUnlockCollateral. Both revert with missing role. The 4,000 collateral has no exit.
Attack path#
PoC#
cd 26299-insufficient-permissions-granted-to-new-auctions-sigmaprime_exp
forge test -vv
The exploit asserts both calls reverted, completed is false, and the auction balance is 4_000 ether. The control reopenToNewAuction grants AUCTION_LOCKER before returning. The same bid then completes: the auction balance goes to 0 and the collateral manager holds the 4,000.
Remediation#
Grant the role inside reopenToNewAuction, which is what the report recommends:
function reopenToNewAuction(address auction) external onlyRole(DEFAULT_ADMIN_ROLE) {
currentAuction = auction;
hasRole[AUCTION_LOCKER][auction] = true;
}
Sigma Prime records the fix in PR 759.
References#
- AuditVault: https://github.com/Auditware/AuditVault/blob/main/findings/26299-insufficient-permissions-granted-to-new-auctions-sigmaprime.md
- Report: https://github.com/sigp/public-audits/blob/master/reports/term-finance/term1/review.pdf
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 26299-insufficient-permissions-granted-to-new-auctions-sigmaprime_exp (evm-hack-registry mirror).
- AuditVault finding: 26299-insufficient-permissions-granted-to-new-auctions-sigmaprime.
Alerts & third-party analyses
These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.