Reproduced Exploit

ParaSpace — [H-04] Anyone can prevent themselves from being liquidated

1. Comment says owner-only; modifier is only onlyWhenFeederExisted. 2. Anyone removes all feeders → no one can setPrice (UPDATER_ROLE revoked). 3. Liquidations that need a live floor TWAP fail — underwater NFT debt stays open.

Nov 2022Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Nov 2022

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. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 15977-h-04-anyone-can-prevent-themselves-from-being-liquidated-as. Standalone Foundry PoC and full write-up: 15977-h-04-anyone-can-prevent-themselves-from-being-liquidated-as_exp in the evm-hack-registry mirror.


Vulnerability classes: genome/liquidation-logic · genome/oracle-freshness · missing access control

Reproduction: self-contained Foundry PoC with only forge-std — no fork. Full trace: output.txt.

AuditVault taxonomy: lang/solidity · platform/code4rena · severity/high · sector/lending · sector/nft · sector/oracle · genome: liquidation-logic · oracle-freshness · reentrancy-guard


Key info#

ImpactHIGH — permissionless removeFeeder strips keepers; NFT liquidations DoS
ProtocolParaSpace
Vulnerable codeNFTFloorOracle.removeFeeder — no onlyRole(DEFAULT_ADMIN_ROLE)
Bug classMissing access control on privileged oracle admin
FindingCode4rena 2022-11-paraspace · #15977 (H-04) · reporter xiaoming90
Report2022-11-paraspace
Compiler^0.8.24 (PoC)

TL;DR#

  1. Comment says owner-only; modifier is only onlyWhenFeederExisted.
  2. Anyone removes all feeders → no one can setPrice (UPDATER_ROLE revoked).
  3. Liquidations that need a live floor TWAP fail — underwater NFT debt stays open.

The vulnerable code#

SOLIDITY
function removeFeeder(address _feeder) external onlyWhenFeederExisted(_feeder) {
    _removeFeeder(_feeder); // @> VULN: missing onlyRole(DEFAULT_ADMIN_ROLE)
    // FIX: onlyRole(DEFAULT_ADMIN_ROLE) on removeFeeder
}

Root cause#

Existence check is not authorization. Feeder removal is a privileged configuration change left open to the world.


Diagrams#

sequenceDiagram participant A as Anyone participant O as NFTFloorOracle participant L as liquidateERC721 A->>O: removeFeeder(keeper) Note over O: no admin role check O-->>O: feeders empty, UPDATER revoked L->>O: getPrice / feeder required O-->>L: revert / blocked

Impact#

A borrower near liquidation (or a competitor) can repeatedly strip feeders, blocking liquidateERC721 until admins re-add keepers — free option on recovery / protocol insolvency risk.

Remediation#

onlyRole(DEFAULT_ADMIN_ROLE) on removeFeeder.

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.