Reproduced Exploit
Etherspot — an attacker installs their session key and claims the escrow
enableSessionKey ends with sessionKeyToWallet[sessionKey] = msg.sender. It does not check that another wallet already owns that key. Locks are stored by session key, and claim pays whoever that mapping names.
Chain
Other
Category
access-control
Date
Jul 2025
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: 61404-c-02-unauthorized-session-key-takeover-via-missing-ownership. Standalone Foundry PoC and full write-up: 61404-c-02-unauthorized-session-key-takeover-via-missing-ownership_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/access-control/missing-owner-check · vuln/access-control/missing-auth
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/61404-c-02-unauthorized-session-key-takeover-via-missing-ownership_exp.sol.
Key info#
| Impact | HIGH — the attacker claims 1,000 the victim escrowed under a session key |
| Protocol | Etherspot CredibleAccountModule |
| Vulnerable code | enableSessionKey sets sessionKeyToWallet[sessionKey] = msg.sender with no existing-owner check |
| Bug class | Anyone can take over a live session key and claim its locked tokens |
| Finding | Shieldify — Credible Account Module, July 2025 · C-02 · id 61404 |
| Report | Etherspot-CredibleAccountModule-Security-Review.md |
| Source | AuditVault finding |
| Status | Fixed by reverting when sessionKeyToWallet[sessionKey] is already set. Reproduced here as a local synthetic. |
| Compiler | solc 0.8.27, cancun, via IR |
TL;DR#
enableSessionKey ends with sessionKeyToWallet[sessionKey] = msg.sender. It does not check that another wallet already owns that key. Locks are stored by session key, and claim pays whoever that mapping names.
- The victim enables the key and escrows 1,000. The mapping points at the victim.
- The attacker calls
enableSessionKeyfor the same key with amount 0. The mapping now points at the attacker. The escrow stays. claimsees the attacker as the owner and transfers 1,000 to them.
The vulnerable code#
Pre-fix tail of enableSessionKey:
if (amount > 0) {
Token(token).transferFrom(msg.sender, address(this), amount);
_locks[sessionKey].push(LockedToken(token, amount, 0));
}
// @> VULN: any caller becomes the owner, even when another wallet already registered this key
sessionKeyToWallet[sessionKey] = msg.sender;
claim then requires only msg.sender == sessionKeyToWallet[sessionKey] and transfers the unpaid locks. The fixed enable reverts with SessionKeyOwned when the mapping is already non-zero. The attacker's call reverts, their claim reverts NotOwner, and the victim can still claim the 1,000.
Root cause#
Ownership of a session key is a single slot overwritten by every successful enable. The escrow is keyed by the session key, not by the wallet that deposited it, so the new owner can claim the old deposit.
Preconditions#
- A victim has enabled a session key and the module holds their tokens. Here that is 1,000.
- The attacker knows the session key address and calls
enableSessionKeyfor it. They pass amount 0, so they do not need a balance. claimpays the address currently stored insessionKeyToWallet.
Attack walkthrough#
- Mint 1,000 to the victim. The victim approves the module and enables the key. The module's balance is 1,000 and the owner is the victim.
- The attacker enables the same key with amount 0.
sessionKeyToWalletbecomes the attacker. - The attacker calls
claim. The module transfers 1,000 to them. The victim's balance and the module's balance are both 0.
Control: the second enableSessionKey reverts SessionKeyOwned. The attacker's claim reverts NotOwner. The module still holds 1,000. A claim from the victim pays the victim 1,000.
Diagrams#
Impact#
The attacker takes 1,000 the victim locked. The victim is no longer the owner, so they cannot claim or recover the session through the module. Any later deposit recorded on that session key is payable to whoever overwrote the mapping.
Remediation#
Before the assignment, revert if sessionKeyToWallet[sessionKey] is already set. Shieldify's fix is that check. Do not let a second caller replace the wallet that deposited the locks.
Sources#
- AuditVault finding 61404
- Shieldify Credible Account Module review, July 2025
- CredibleAccountModule.sol @ d4774db
enableSessionKeyaround line 144
Taxonomy#
vuln/access-control/missing-owner-checkvuln/access-control/missing-auth
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 61404-c-02-unauthorized-session-key-takeover-via-missing-ownership_exp (evm-hack-registry mirror).
- AuditVault finding: 61404-c-02-unauthorized-session-key-takeover-via-missing-ownership.
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.