Reproduced Exploit
InfiniFi — StakedToken holders can circumvent restriction by approving another address to withdraw
1. Alice holds siUSD and is action-restricted (cannot transfer/withdraw). 2. Alice approves an unrestricted third party for her shares. 3. Alice's own withdraw reverts with ActionRestricted. 4. The third party calls withdraw(assets, alice, alice) — only caller is checked — burns Alice's shares and…
Chain
Other
Category
untagged
Date
Mar 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: 55053-stakedtoken-holders-can-circumvent-restriction-by-approving. Standalone Foundry PoC and full write-up: 55053-stakedtoken-holders-can-circumvent-restriction-by-approving_exp in the
evm-hack-registrymirror.
Vulnerability classes: token-approval-flow · access-control/broken-logic · privilege-escalation/role-bypass
Reproduction: self-contained Foundry PoC with only
forge-std— no fork. output.txt · test/55053-…_exp.sol.
AuditVault taxonomy: lang/solidity · platform/spearbit · severity/high · genome: token-approval-flow · access-roles · access-control/broken-logic · privilege-escalation/role-bypass
Key info#
| Impact | HIGH — transfer/withdraw restriction on staked shares is bypassed via ERC-20 approve + third-party withdraw |
| Protocol | InfiniFi Contracts — StakedToken._withdraw / _update |
| Vulnerable code | _withdraw checks ActionRestriction on caller only; _update skips checks on burns |
| Bug class | Incomplete restriction surface / approval-path bypass |
| Finding | Spearbit — InfiniFi, March 2025 · #55053 · reporter R0bert |
| Report | InfiniFi-Spearbit-Security-Review-March-2025.pdf |
| Source | AuditVault |
| Fix | commit 913960a9 — also validate owner is not restricted |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- Alice holds siUSD and is action-restricted (cannot transfer/withdraw).
- Alice approves an unrestricted third party for her shares.
- Alice's own
withdrawreverts withActionRestricted. - The third party calls
withdraw(assets, alice, alice)— onlycalleris checked — burns Alice's shares and returns iUSD to Alice. Restriction bypassed.
Vulnerable code#
function _withdraw(address caller, address receiver, address owner, uint256 assets, uint256 shares)
internal
{
_checkActionRestriction(caller); // @> VULN: owner never validated
return ERC4626._withdraw(caller, receiver, owner, assets, shares);
}
function _update(address _from, address _to, uint256 _value) internal override {
if (_from != address(0) && _to != address(0)) {
_checkActionRestriction(_from);
}
// burns skip the _from check
return ERC20._update(_from, _to, _value);
}
Fix: also call _checkActionRestriction(owner) in _withdraw.
Diagrams#
Impact#
Restricted stakers can still exit (or be exited) via any approved spender, defeating transfer/withdraw locks used for cooldowns, sanctions, or exit controls.
Sources#
- AuditVault #55053
- Spearbit InfiniFi March 2025
- Reduced
StakedToken._withdraw/_updatefrom the finding (fixed in913960a9)
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 55053-stakedtoken-holders-can-circumvent-restriction-by-approving_exp (evm-hack-registry mirror).
- AuditVault finding: 55053-stakedtoken-holders-can-circumvent-restriction-by-approving.
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.