Reproduced Exploit
BondEscalationAccounting — a self-created request drains the pledge escrow
onlyAllowedModule asks the oracle whether msg.sender is a module on the request. Anyone can create a request and list their own address. releasePledge then treats that caller as authorized and transfers the dispute's pledge escrow. A request that lists someone else reverts. An accounting contract t…
Chain
Other
Category
access-control
Date
May 2024
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. 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.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 41794-ineective-access-control-can-lead-to-user-funds-being-stolen. Standalone Foundry PoC and full write-up: 41794-ineective-access-control-can-lead-to-user-funds-being-stolen_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/access-control/missing-auth·vuln/access-control/broken-logic
Key info#
| Protocol | Wonderland Prophet |
| Finding | Trail of Bits, AuditVault 41794 |
| Vulnerable code | onlyAllowedModule |
| Harm | The caller takes 100000 USDC of pledges. An unlisted request and a fixed module both revert. |
| Chain | local synthetic |
TL;DR#
onlyAllowedModule asks the oracle whether msg.sender is a module on the request. Anyone can create a request and list their own address. releasePledge then treats that caller as authorized and transfers the dispute's pledge escrow. A request that lists someone else reverts. An accounting contract that accepts only one fixed module also reverts, and its 100000 stays put.
The vulnerable code#
modifier onlyAllowedModule(bytes32 _requestId) {
if (!ORACLE.allowedModule(_requestId, msg.sender)) revert AccountingExtension_UnauthorizedModule();
_;
}
allowedModule is true when the address was stored on that request. createRequest is permissionless.
Root cause#
The modifier proves only that the caller wrote themselves onto some request. It does not prove that the caller is the dispute module the pledgers used.
Preconditions#
The accounting contract holds 100000 of pledged tokens. The attacker creates a request id and passes their own address as the module. releasePledge is external and guarded only by onlyAllowedModule.
Attack walkthrough#
- The attacker calls
createRequestwith their own address. allowedModulereturns true for that pair.releasePledgeruns the modifier, passes, and transfers 100000 to the attacker.- The same function with a request that lists a different module reverts.
- The control accounting accepts only one hardcoded module. The call reverts and the 100000 remains.
Diagrams#
Impact#
Pledgers lose the 100000 USDC held for the dispute. The attacker receives it in one call. Requests that do not list the attacker, and a module allowlist of one address, do not pay.
Remediation#
Do not derive module authorization from a request anyone can create. Pin the module addresses at deployment, as the review recommends.
How to reproduce#
cd 41794-ineective-access-control-can-lead-to-user-funds-being-stolen_exp
forge test -vv
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/41794-ineective-access-control-can-lead-to-user-funds-being-stolen.md
- Trail of Bits review: https://github.com/trailofbits/publications/blob/master/reviews/2024-05-wonderland-prophet-securityreview.pdf
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 41794-ineective-access-control-can-lead-to-user-funds-being-stolen_exp (evm-hack-registry mirror).
- AuditVault finding: 41794-ineective-access-control-can-lead-to-user-funds-being-stolen.
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.