Reproduced Exploit

One World — joinDAO mints the only membership with no KYC and no ecosystem NFT

Joining the ecosystem is supposed to require KYC and an ecosystem NFT. joinDAO checks the tier index and the remaining supply, pulls the price, and mints. It never reads OWPIdentity and never reads the NFT balance.

Nov 2024•Other•access-control•3 min read

Chain

Other

Category

access-control

Date

Nov 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: 49835-missing-kyc-and-nft-ownership-verification-for-ecosystem-acc. Standalone Foundry PoC and full write-up: 49835-missing-kyc-and-nft-ownership-verification-for-ecosystem-acc_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/access-control/missing-auth · vuln/access-control/missing-modifier

Reproduction: a self-contained Foundry PoC that compiles and runs offline with only forge-std — no fork and no RPC. Trace: output.txt. PoC: test/49835-missing-kyc-and-nft-ownership-verification-for-ecosystem-acc_exp.sol.


Key info#

ImpactHIGH — an account with no KYC and no ecosystem NFT mints the only DAO membership and fills the tier
ProtocolOne World MembershipFactory.joinDAO
Vulnerable codemembership.mint after the price transfer, with no identity check
Bug classProduct KYC and NFT gates exist only off-chain
FindingCodeHawks — One World, 6–13 Nov 2024 · id 49835
ReportCodeHawks contest
SourceAuditVault finding
Compilersolc 0.8.27, cancun, via IR

TL;DR#

Joining the ecosystem is supposed to require KYC and an ecosystem NFT. joinDAO checks the tier index and the remaining supply, pulls the price, and mints. It never reads OWPIdentity and never reads the NFT balance.

An unverified account approves 100 OWP, calls joinDAO on the only tier, and receives membership id balance 1. tierMinted becomes 1, so a later verified user finds the tier full. The fixed factory reverts with KYC and then with ecosystem NFT.

The vulnerable code#

SOLIDITY
require(tierAmount > tierMinted, "Tier full.");
uint256 price = tierPrice;
uint256 platformFees = (20 * price) / 100;
tierMinted += 1;
currency.transferFrom(msg.sender, owpWallet, platformFees);
currency.transferFrom(msg.sender, daoMembershipAddress, price - platformFees);
membership.mint(msg.sender, 1); // @> VULN: no KYC check and no ecosystem-NFT check
DIFF
 function joinDAO(address daoMembershipAddress, uint256 tierIndex) external {
+    require(identity.isKYC(msg.sender), "KYC");
+    require(ecosystemNft.balanceOf(msg.sender) > 0, "ecosystem NFT");
     require(noOfTiers > tierIndex, "Invalid tier.");

Attack walkthrough#

  1. OWPIdentity.isKYC is false and the ecosystem NFT balance is 0.
  2. The caller approves 100 OWP and calls joinDAO for tier 0. The tier cap is 1.
  3. The factory pulls 20 OWP to the platform wallet and 80 OWP to the DAO.
  4. It mints one membership. The tier is now full.

Diagrams#

flowchart TD A["Caller has no KYC and no ecosystem NFT"] --> B["joinDAO checks only the tier cap and the price"] B --> C["100 OWP is pulled"] C --> D["Membership is minted"] D --> E["The single tier slot is gone"]

Impact#

Anyone who can pay the tier price receives a membership the product restricts to KYC'd NFT holders. With a cap of one, that caller also consumes the seat a verified user was supposed to get.

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.