Reproduced Exploit
ZeroLend — Missing access control in afterLockUpdate
1. afterLockUpdate is intended to be called only by ZeroLocker after lock changes. 2. It is external with no caller restriction. 3. Anyone holding pool tokens can self-register a reward weight. 4. Emissions accrue and are claimed without ever locking.
Chain
Other
Category
untagged
Date
Jan 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. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 40821-missing-accesscontrol-in-afterlockupdate-cantina-none-zerole. Standalone Foundry PoC and full write-up: 40821-missing-accesscontrol-in-afterlockupdate-cantina-none-zerole_exp in the
evm-hack-registrymirror.
Vulnerability classes: access-roles · reward-theft · reward-accounting
Reproduction: self-contained Foundry PoC with only
forge-std— no fork. output.txt · test/40821-…sol.
AuditVault taxonomy: lang/solidity · platform/cantina · severity/high · sector/lending · genome: reward-calculation · variant · reward-theft · access-roles · reward-accounting
Key info#
| Impact | HIGH — non-lockers register reward weight and drain emissions |
| Protocol | ZeroLend — ZLRewardsController.afterLockUpdate |
| Vulnerable code | afterLockUpdate external with no onlyZeroLocker |
| Bug class | Missing access control on balance registration |
| Finding | Cantina — ZeroLend, Jan 2024 · #40821 · reporter Sujith Somraaj |
| Report | cantina_competition_zerolend_jan2024.pdf |
| Source | AuditVault |
| Fix | onlyZeroLocker modifier |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
afterLockUpdateis intended to be called only byZeroLockerafter lock changes.- It is
externalwith no caller restriction. - Anyone holding pool tokens can self-register a reward weight.
- Emissions accrue and are claimed without ever locking.
Diagrams#
Impact#
Reward emissions meant for locked stake (or authorized balance hooks) can be drained by unauthorized self-registration — matching the competition harness that registered users via a naked afterLockUpdate call.
Sources#
- AuditVault #40821
- Cantina ZeroLend Jan 2024
- Finding quotes
ZLRewardsController.sol#L588-L590
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 40821-missing-accesscontrol-in-afterlockupdate-cantina-none-zerole_exp (evm-hack-registry mirror).
- AuditVault finding: 40821-missing-accesscontrol-in-afterlockupdate-cantina-none-zerole.
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.