Reproduced Exploit
Blueberry HyperVaultRouter — missing asset index check mints shares for any token
1. deposit(asset, amount) looks up assetIndexes[asset] and requires _isAssetSupported. 2. Unregistered tokens return mapping default 0, and USDC is hardcoded as index 0. 3. Attacker deposits a worthless ERC20, receives USDC-priced shares, redeems real USDC.
Chain
Other
Category
logic
Date
Apr 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: 61477-c-02-missing-asset-index-check-allows-any-token-to-mint-shar. Standalone Foundry PoC and full write-up: 61477-c-02-missing-asset-index-check-allows-any-token-to-mint-shar_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/logic/wrong-condition · impact/loss-of-funds/direct-drain · check/missing-asset-validation
Reproduction: a self-contained Foundry PoC that compiles & runs in an isolated project with only
forge-std— no fork, no RPC, noanvil_state. Full trace: output.txt. PoC: test/61477-c-02-missing-asset-index-check-allows-any-token-to-mint-shar_exp.sol.
AuditVault taxonomy: severity/high · sector/lending · sector/stable · platform/pashov · wrong-condition · wrong-state
Key info#
| Impact | HIGH — any unregistered ERC20 mints USDC-priced shares; attacker redeems real USDC |
| Protocol | Blueberry HyperVaultRouter |
| Vulnerable code | deposit: assetIndexes[asset] defaults to 0 == USDC_SPOT_INDEX |
| Bug class | Missing zero-index / unregistered-asset check |
| Finding | Pashov Audit Group Blueberry 2025-04-30 · #61477 · C-02 |
| Report | Blueberry-security-review_2025-04-30 |
| Source | AuditVault |
| Status | Audit finding. Reproduced as a standalone local PoC. |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
deposit(asset, amount)looks upassetIndexes[asset]and requires_isAssetSupported.- Unregistered tokens return mapping default
0, and USDC is hardcoded as index0. - Attacker deposits a worthless ERC20, receives USDC-priced shares, redeems real USDC.
The vulnerable code#
uint64 assetIndex_ = assetIndexes[asset];
require(_isAssetSupported(assetIndex_), "COLLATERAL_NOT_SUPPORTED"); // @> VULN
// FIX: require(assetIndex_ != 0 || asset == address(usdc), "not usdc");
Root cause#
The support check treats index 0 as always valid because USDC lives at USDC_SPOT_INDEX = 0. Solidity mappings return 0 for missing keys, so every unknown token is accepted as USDC.
Preconditions#
- Router has real USDC deposits (honest TVL).
- Attacker can mint/hold any ERC20 and call
deposit.
Attack walkthrough#
- Alice deposits 100 USDC → 100e18 shares; TVL = 100e18.
- Bob deposits 100 worthless RND → check passes (index 0) → 100e18 shares; TVL still 100e18.
- Bob redeems 100e18 shares → 50 USDC of Alice's deposit.
Diagrams#
Impact#
Share supply inflates without TVL growth. Attackers convert worthless tokens into claims on real USDC, diluting honest depositors by 50% in the PoC.
Sources#
- AuditVault finding #61477
- Pashov Blueberry security review 2025-04-30
- Reduced source: HyperVaultRouter.deposit /
_isAssetSupported(Pashov Blueberry 2025-04-30)
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 61477-c-02-missing-asset-index-check-allows-any-token-to-mint-shar_exp (evm-hack-registry mirror).
- AuditVault finding: 61477-c-02-missing-asset-index-check-allows-any-token-to-mint-shar.
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.