Reproduced Exploit

Etherspot ResourceLockValidator — replayable signature proof

The validator checks a ResourceLock Merkle proof but never consumes it. EntryPoint can therefore submit the same call data with a different nonce, and the wallet executes the signed action repeatedly.

Jan 2025Otherbridge3 min read

Chain

Other

Category

bridge

Date

Jan 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: 61409-c-07-in-resourcelockvalidator-the-validateuserop-function-is. Standalone Foundry PoC and full write-up: 61409-c-07-resource-lock-validator-signature-proof-replay_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/bridge/replay · vuln/auth/signature-replay

Reproduction: local synthetic Foundry reduction; the complete passing trace is in output.txt.

Key info#

FieldValue
LossThe same resource-lock call executes twice; no live funds are moved in this synthetic.
Vulnerable contractResourceLockValidator.validate (reduced in test/61409-c-07-resource-lock-validator-signature-proof-replay.sol)
Attacker EOA0x1111111111111111111111111111111111111111 (configured runner caller)
Attack contractExploit
Attack txLocal Foundry Exploit.run()
Chain · block · dateEthereum model · block 0 · synthetic
CompilerSolidity ^0.8.24
Bug classReplayable proof / missing nonce or consumed-proof state

TL;DR#

The validator checks a ResourceLock Merkle proof but never consumes it. EntryPoint can therefore submit the same call data with a different nonce, and the wallet executes the signed action repeatedly.

Background#

ResourceLock authorization is intentionally narrower than ordinary account nonce validation. It must bind a proof to a one-time call (or maintain a nonce/consumed set) before returning validation success.

The vulnerable code#

The synthetic preserves the audited operation with an @> VULN marker:

SOLIDITY
function validate(bytes32 proof, uint256 /*nonce*/) external returns (bool) {
    validations++;
    // @> VULN: proof is accepted without recording it as consumed.
    return proof != bytes32(0);
}

Full source: test/61409-c-07-resource-lock-validator-signature-proof-replay.sol.

Root cause#

The validator treats the EntryPoint nonce as sufficient even though the signed hash is reconstructed from ResourceLock call data only. No proof hash is stored as consumed, so a fresh nonce does not create a fresh authorization.

Preconditions#

  • A wallet has installed the ResourceLock validator and a valid signed proof exists.
  • The EntryPoint accepts a subsequent nonce for the same call data.
  • The validator is reached without a one-time proof/nonce check.

Attack walkthrough#

  1. Exploit.run() validates PROOF with nonce 0 and executes the wallet.
  2. It submits the identical PROOF with nonce 1; validate returns true again.
  3. The wallet execution counter reaches 2, proving replay. The passing assertion is recorded at output.txt:355.

Diagrams#

sequenceDiagram participant A as Attacker participant V as ResourceLockValidator participant W as Wallet A->>V: validate(PROOF, nonce 0) V-->>A: success (proof not consumed) A->>W: execute(PROOF) A->>V: validate(PROOF, nonce 1) V-->>A: success again A->>W: execute(PROOF) again

Remediation#

Hash the nonce into the signed ResourceLock authorization and reject a proof hash already present in a consumed mapping. Mark it consumed atomically before executing the call.

How to reproduce#

BASH
cd evm-hack-registry/61409-c-07-resource-lock-validator-signature-proof-replay_exp
forge test -vvvvv

Sources#

Reference: https://github.com/shieldify-security/audits-portfolio-md/blob/main/Etherspot-CredibleAccountModule-Security-Review.md


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.