Reproduced Exploit

AmpleEarn — unrestricted router allows unauthorized merkle root setting

Router batchSetMerkleRootsStrict has no auth; vault setMerkleRoots authorizes msg.sender, which is the router when not routed through EVC

Dec 2025Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Dec 2025

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. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 64041-c-01-unrestricted-router-allows-unauthorized-merkle-root-set. Standalone Foundry PoC and full write-up: 64041-c-01-unrestricted-router-allows-unauthorized-merkle-root-set_exp in the evm-hack-registry mirror.


Reproduction: self-contained Foundry PoC (forge-std only) — no fork. Full trace: output.txt.

AuditVault taxonomy: lang/solidity · platform/pashov · severity/high · genome: missing-modifier · direct-drain · account-ownership


Key info#

ImpactHIGH — 100 USDC payout pot stolen by forging designated-recipient merkle roots via an unrestricted router that is registered as payout manager
ProtocolAmpleEarn
Bug classRouter batchSetMerkleRootsStrict has no auth; vault setMerkleRoots authorizes msg.sender, which is the router when not routed through EVC
FindingPashov Audit Group (C-01) · #64041
Reporthttps://github.com/pashov/audits/blob/master/team/md/AmpleEarn-security-review_2025-12-12.md
SourceAuditVault
StatusAudit finding — reproduced as a standalone local synthetic
Compiler^0.8.24 (PoC)

TL;DR#

Router batchSetMerkleRootsStrict has no auth; vault setMerkleRoots authorizes msg.sender, which is the router when not routed through EVC

HARM: 100 USDC payout pot stolen by forging designated-recipient merkle roots via an unrestricted router that is registered as payout manager


Root cause#

Router batchSetMerkleRootsStrict has no auth; vault setMerkleRoots authorizes msg.sender, which is the router when not routed through EVC

Preconditions#

Protocol-specific setup as described in the original finding (roles / managers / pending state in place).

Attack walkthrough#

See the synthetic test/64041-c-01-unrestricted-router-allows-unauthorized-merkle-root-set.sol and the Playground story beats. The @> VULN marker sits on the blamed executable line.

Diagrams#

sequenceDiagram participant A as Attacker participant R as AmpleEarnRouter participant V as AmpleEarn vault A->>R: batchSetMerkleRootsStrict forged root R->>V: setMerkleRoots direct call Note over V: msg.sender is router which is payout manager A->>V: claimDesignated forged leaf V-->>A: USDC drained

Impact#

100 USDC payout pot stolen by forging designated-recipient merkle roots via an unrestricted router that is registered as payout manager

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.