Reproduced Exploit
CoreVault — redemption pays the Pancake spot when the WBNB window is empty
The incident transaction is a contract creation. The constructor flash-borrows WBNB, sells it into the Pancake WBNB/USDT pair, and redeems a CoreVault position in the same transaction. redeemPrincipal converts the USD principal into BNB with OracleLib.getAccountingPrices.
Loss
259.092783959966824034 BNB leaves InsurancePool. The attacker keeps 160.257898629710162994 BNB after unwindin…
Chain
BNB Chain
Category
oracle
Date
Nov 2026
Source
Crypto Training
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. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.
Source & credit. Crypto Training original detection and analysis (live Twitter/X security-alert intake — not from DeFiHackLabs). Standalone Foundry PoC, offline
anvil_state.json, and full write-up: 2026-11-CoreVault_exp in theevm-hack-registrymirror.
Vulnerability classes: vuln/oracle/spot-price · vuln/defi/price-manipulation Reproduction: the PoC compiles and runs in an isolated Foundry project at this project folder. Full verbose trace: output.txt. The trace forks BNB Chain at block 131,507,809 and
[PASS] testExploitpays the attacker 160.257898629710162994 BNB. The insurance pool loses 259.092783959966824034 BNB.
Key info#
| Loss | 259.092783959966824034 BNB leaves InsurancePool. The attacker keeps 160.257898629710162994 BNB after unwinding the swap |
| CoreVault | 0x302f5084ba0e4a2d4de5e6bc5dd5247028f5d674, proxy to 0x11d9df62e9c2919cbe583387473c36d0b894fe21 |
| InsurancePool | 0xf40e0d525003fb6c6a9a7d79734a87a465053df1 |
| Attacker | 0xd3565b191b28b49cc517189b984dacdb1ff05304 |
| Attack tx | 0x072a10a579e2a8afa26a681205a2aaaa38f74bcb9d1064b12bd9e9ebe2c598b3, creation, block 131,507,810 |
| Chain / block / date | BNB Chain / fork block 131,507,809 / 2026-11-03 |
TL;DR#
The incident transaction is a contract creation. The constructor flash-borrows WBNB, sells it into the Pancake WBNB/USDT pair, and redeems a CoreVault position in the same transaction. redeemPrincipal converts the USD principal into BNB with OracleLib.getAccountingPrices.
That function writes the current Pancake spot into wbnbAvgWindow and then uses the window average. The window stores one sample every three minutes, and an empty window returns the spot itself. A spot that was just moved by the constructor therefore becomes the redemption price. Treasury.payoutBnb pulls whatever the treasury does not already hold from InsurancePool.withdrawReserve.
The three-source median in _selectWbnbPerUsd is not the function this redemption calls. The accounting path never consults the TWAP.
The price#
getAccountingPrices pushes the live spot, then reads the average. _avgTimeWindow returns that spot when the window has never been filled.
_updateAccountingSnapshots(s);
uint256 avgW = wbnbPerUsd > 0 ? wbnbPerUsd : _avgWbnbPerUsdView(s);
wbnbPerUsd = avgW;
if (w.filled == 0) return fallbackSpot;
_redeemPrincipalCore multiplies the USD principal by that rate and asks the treasury to pay BNB.
Diagrams#
Remediation#
- Do not let
getAccountingPricestreat an empty or just-written window as a price. IfwbnbAvgWindow.filledis below 3, revert the redemption. - Ignore a sample written in the same transaction as the redemption.
- Cap the redemption rate by a previously stored observation that the caller cannot update in the same call.
How to reproduce#
Offline, from this folder:
bash ../_shared/run-poc/run_poc.sh 2026-11-CoreVault_exp -vv
testExploit creates the incident contract from its public init code. testWrapperPaysAttacker does the same creation from a second contract and checks that the BNB still arrives at the attacker.
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 2026-11-CoreVault_exp (evm-hack-registry mirror).
- Attack transaction: view on explorer.
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.