Reproduced Exploit

Prophet — a pledge can name its own bond token and still take the USDC dispute bond

pledgeAgainstDispute checks that the dispute argument matches the stored dispute, then decodes the bond token and the pledging deadline from a separate request argument. It never hashes that request and compares it to dispute.requestId.

May 2024•Other•input-validation•3 min read

Chain

Other

Category

input-validation

Date

May 2024

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

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. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 41793-arbitrary-request-data-can-be-provided-to-module-functions-i. Standalone Foundry PoC and full write-up: 41793-arbitrary-request-data-can-be-provided-to-module-functions-i_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/input-validation/missing · vuln/logic/missing-validation

Reproduction: a self-contained Foundry PoC that compiles and runs offline with only forge-std — no fork and no RPC. Trace: output.txt. PoC: test/41793-arbitrary-request-data-can-be-provided-to-module-functions-i_exp.sol.


Key info#

ImpactHIGH — 1 wei of an attacker token wins the dispute and takes the proposer's 1,000 USDC
ProtocolWonderland Prophet, BondEscalationResolutionModule.pledge
Vulnerable codedeadline and bond token are read from the caller request, which is not compared to dispute.requestId
Bug classModule validation trusts attacker-supplied request data
FindingTrail of Bits — Wonderland Prophet, May 2024 · id 41793
ReportTrail of Bits review
SourceAuditVault finding
Compilersolc 0.8.27, cancun, via IR

TL;DR#

pledgeAgainstDispute checks that the dispute argument matches the stored dispute, then decodes the bond token and the pledging deadline from a separate request argument. It never hashes that request and compares it to dispute.requestId.

The honest request's deadline has already passed. The attacker passes their own ERC-20 and a deadline that is still open, pledges 1 wei, and resolve pays them the 1,000 USDC that was bonded on the dispute. A fixed module reverts with request mismatch before any token moves.

The vulnerable code#

SOLIDITY
require(supplied.requestId == dispute.requestId, "dispute");
Request memory params = request;
uint256 deadline = ESCALATION_START + params.timeUntilDeadline; // @> VULN
ERC20(params.bondToken).transferFrom(msg.sender, address(this), amount);
activeToken = params.bondToken;
DIFF
 Request memory params = request;
+bytes32 got = keccak256(abi.encode(params));
+require(got == dispute.requestId, "request mismatch");
 uint256 deadline = ESCALATION_START + params.timeUntilDeadline;

Attack walkthrough#

  1. The module holds 1,000 USDC posted for the honest pricing request. Escalation started at timestamp 1, so the real window is over.
  2. The attacker builds a request whose id does not match, whose bond token is EVIL, and whose timeUntilDeadline is block.timestamp.
  3. pledgeAgainstDispute accepts it. The deadline check uses the fake window. transferFrom pulls 1 wei of EVIL.
  4. activeToken is now EVIL and the against-side leads.
  5. resolve sends the USDC pot to the caller.

Diagrams#

flowchart TD A["Honest dispute escrows 1000 USDC"] --> B["Attacker passes a request with their own token"] B --> C["Request hash is not compared to dispute.requestId"] C --> D["One wei of EVIL is pledged inside a fake window"] D --> E["resolve pays the attacker the USDC bond"]

Impact#

Anyone can out-pledge a dispute with a token they minted and take the honest side's bond. Here that bond is 1,000 USDC, paid for 1 wei of EVIL. The same missing check is what the review flags on the other resolution modules.

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

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.