Reproduced Exploit

Regnum Aurum: anyone can pull a FeeCollector allowance

This is the same FeeCollector.collectFee bug as AuditVault 66189, filed again under id 66368. borrowWithInsurance tells the user to approve the insurance fee to the collector. collectFee is public and pulls target for amount. The attacker names the victim and takes 1000 USDC. The victim never borro…

May 2025•Ethereum•access-control•2 min read

Loss

1000 USDC pulled from a victim who only approved an insurance fee

Chain

Ethereum

Category

access-control

Date

May 2025

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

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.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 66368-h-27-unrestricted-feecollectorcollectfee-enables-unauthorize. Standalone Foundry PoC and full write-up: 66368-h-27-unrestricted-feecollectorcollectfee-enables-unauthorize_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/access-control/missing-auth · vuln/logic/missing-check

Key info#

FieldValue
Loss1000 USDC pulled from a victim who only approved an insurance fee
Vulnerable contractFeeCollector.collectFee
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 2025-05
Compilersolc 0.8.27, cancun, via IR
Bug classcollectFee transferFroms an arbitrary target with no caller check

TL;DR#

This is the same FeeCollector.collectFee bug as AuditVault 66189, filed again under id 66368. borrowWithInsurance tells the user to approve the insurance fee to the collector. collectFee is public and pulls target for amount. The attacker names the victim and takes 1000 USDC. The victim never borrows.

The vulnerable code#

SOLIDITY
MockUSDC(token).transferFrom(target, address(this), amount); // @> VULN

Pull the fee inside borrowWithInsurance instead of leaving a standing allowance that any caller can spend.

Root cause#

The allowance is granted to the collector, and the collector spends it for any caller. The fee-type and supported-token checks do not restrict msg.sender.

Preconditions#

  • USDC is supported and the insurance fee type is registered.
  • The victim has approved FeeCollector for 1000 USDC.

Attack walkthrough#

  1. The victim approves 1000 USDC to FeeCollector.
  2. The attacker calls collectFee with the victim as target and keccak256("INSURANCE_FEE").
  3. transferFrom moves the 1000 USDC into the collector.
  4. The victim's balance is 0 and the allowance is spent.

Diagrams#

flowchart TD A["Victim approves FeeCollector for the insurance fee"] --> B["Attacker calls collectFee with the victim as target"] B --> C["VULN transferFrom pulls the victim with no caller check"] C --> D["Victim balance is 0 and the collector holds 1000 USDC"]

Impact#

The victim loses 1000 USDC that they approved for a fee they were never charged. The tokens are held by FeeCollector. The same allowance cannot be used for the borrow that prompted it.

How to reproduce#

BASH
cd 66368-h-27-unrestricted-feecollectorcollectfee-enables-unauthorize_exp
forge test -vv

test_collectFee_pulls_victim_allowance asserts the victim's balance is 0 and the collector holds 1000 USDC.

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

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.