Reproduced Exploit

StationX: native deposits sit on the DAO and the execution call cannot move them

_buyGovernanceTokenERC20DAO sends msg.value to the DAO when depositTokenAddress is the native token. updateProposalAndExecution is the DAO's call-out, and it uses _contract.call(_data) with no value. A 1 ETH deposit stays on the DAO. The target observes msg.value == 0.

Jun 2024•Ethereum•dos•3 min read

Loss

1 ETH sent to the DAO on a native governance-token purchase. The execution call forwards 0

Chain

Ethereum

Category

dos

Date

Jun 2024

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: 41383-c-02-native-tokens-in-the-daos-are-stuck-pashov-audit-group. Standalone Foundry PoC and full write-up: 41383-c-02-native-tokens-in-the-daos-are-stuck-pashov-audit-group_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/dos/frozen-funds · vuln/logic/missing-check

Key info#

FieldValue
Loss1 ETH sent to the DAO on a native governance-token purchase. The execution call forwards 0
Vulnerable contractERC20DAO.updateProposalAndExecution
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 2024-06
Compilersolc 0.8.27, cancun, via IR
Bug classNative custody with no value-bearing execution path

TL;DR#

_buyGovernanceTokenERC20DAO sends msg.value to the DAO when depositTokenAddress is the native token. updateProposalAndExecution is the DAO's call-out, and it uses _contract.call(_data) with no value. A 1 ETH deposit stays on the DAO. The target observes msg.value == 0.

The vulnerable code#

SOLIDITY
payable(_daoDetails.assetsStoredOnGnosis ? _daoDetails.gnosisAddress : dao).call{value: _totalAmount}("");
(bool success,) = _contract.call(_data); // @> VULN: the call forwards no value, so native deposits on the DAO cannot be moved

The review's fix adds a _value argument and call{value: _value}, and makes the function payable so the DAO can attach value without spending its deposits.

Root cause#

Deposits arrive as ETH. The only outbound call cannot name an amount of ETH. There is no withdraw function either.

Preconditions#

  • The DAO's deposit token is the native token address.
  • A buyer sends 1 ETH through the factory buy path.
  • A later execution targets a payable sink.

Attack walkthrough#

  1. The buyer calls the factory with 1 ETH.
  2. The native branch forwards that 1 ETH to the DAO.
  3. Execution calls the sink with empty value.
  4. The sink records 0. The DAO balance is still 1 ETH.

Diagrams#

flowchart TD A["Buyer sends 1 ETH to the factory"] --> B["Native branch forwards it to the DAO"] B --> C["VULN execution call has no value"] C --> D["Sink records msg.value of 0"] D --> E["DAO balance remains 1 ETH"]

Impact#

Every DAO that takes native deposits accumulates ETH it cannot spend, send, or return. This run leaves 1 ETH on the DAO. The same path applies to every later native purchase.

Remediation#

Pass _value into updateProposalAndExecution and forward it with call{value: _value}, as the Pashov diff specifies. Make the function payable if callers should attach fresh ETH instead of spending deposits.

How to reproduce#

BASH
cd 41383-c-02-native-tokens-in-the-daos-are-stuck-pashov-audit-group_exp
forge test -vv

Captured output is output.txt.

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.