XLinkedInTelegram
Hack Analysis

How did Cardex get exploited of $400K?

Discover how Cardex was exploited for $400K. Learn the attack flow, root causes, and key security takeaways to protect your funds.

Author
QuillAudits Team
February 25, 2025
How did Cardex get exploited of $400K?
XLinkedInTelegram

Overview

On 19th February, an exploit targeting Abstract wallets linked to Cardex resulted in the theft of approximately $400,000 in ETH across 9,000 wallets.

The attack leveraged session key mismanagement and an exposed session signer private key on Cardex’s frontend, allowing the attacker to drain funds by impersonating users.

This was not a network-wide issue but rather a targeted exploit against users who had granted session key permissions to Cardex.

Attack Flow: How Did It Happen?

1. Session Key Misuse:

2. The Shared Session Signer Problem:

  • Instead of assigning unique session signers per user, Cardex used a single session signer wallet for all users.
  • The private key of this session signer was exposed in the Cardex frontend (rookie mistake).

3. How the Attacker Exploited It:

  • Step 1: Attacker identifies an active session from a victim.
  • Step 2: Uses the compromised session signer to call buyShares and purchase shares on behalf of the victim.
  • Step 3: Transfers those shares to their own wallet using transferShares.
  • Step 4: Dumps the shares on Cardex’s bonding curve to steal ETH.

4. Where Did the Money Go?

  • Attacker Contract: 0xee580828b426b6cc33817bCE419DaF65a516aA7e
  • Funds Dispersed Across Wallets:
    • 0x57D81b6bFd64ACB54529d2e938c8BA43C138F7d8
    • 0xF9c5Bb27aA8AA62c98A9672B8A24Beef5C35D7FD
    • 0x14D4DEaa4aeC28A6387A1805Ff853F1F06C909f3

5. Gas Fees and Obfuscation:

  • The stolen funds first passed through 0x0000000000000000000000000000000000008001 (a bootloader address used for gas payments) before being redirected to the attacker’s wallets.
  • The attacker didn’t use a contract with callable functions, instead, they directly executed transactions from users' wallets, making it harder to track and flag malicious activity.

Root Cause Analysis: What Went Wrong?

  • Single Session Signer for All Users: Every user on Cardex shared the same session signer, a horrible security practice.
  • Private Key Exposure: The session signer’s private key was leaked in the frontend, allowing attackers to hijack active sessions.
  • Poor Session Key Implementation: Instead of properly scoping session keys per user, Cardex left an open door for attackers.
  • No Session Key Revocation Visibility: Users had no easy way to monitor or revoke active session keys.

User Impact: How Bad Was It?

For Users:

  • Disconnect Abstract Wallets from Cardex.
  • Avoid interacting with Cardex until they confirm a fix.
  • Monitor your transactions for suspicious activity.


For Developers

  • Never use a shared session signer for all users. Each user should have a dedicated session signer.
  • Do not expose private keys in frontend code. Use secure backend storage & encryption.
  • Session keys must have strict, limited scopes. They should not allow arbitrary transactions.
  • Provide users with visibility & control over session keys. Implement a dashboard for session revocation.
  • Conduct full-stack security audits, not just contract audits. This was an infrastructure-level failure, not a smart contract bug.

Closing Thoughts

Session keys are a powerful UX tool, but they must be implemented with security in mind.

This attack wasn’t just a one-off blunder, it exposed a systemic issue in how Web3 projects handle session keys.

With better practices, this entire exploit could have been avoided.

While Abstract and Cardex will likely implement fixes, this incident is a wake-up call for any dapp using session keys.

The next exploit might not just drain ETH, it could target ERC20s, NFTs, or even governance permissions.

Stay vigilant, revoke approvals, and never trust blindly, especially when the keys to your funds are in someone else’s hands.

Stay SAFE.

Contents

Tell Us About Your Project
Request An Audit
Subscribe to Newsletter
hashing bits image
Loading...

STAY IN THE LOOP

Get updates on our community, partners, events, and everything happening across the ecosystem — delivered straight to your inbox.

Subscribe Now!

newsletter
DeFi SecurityplumeUniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

Office 104/105 Level 1, Emaar Square, Building 4 Sheikh Mohammed Bin Rashid Boulevard Downtown Dubai, United Arab Emirates P.O box: 416654

audits@quillaudits.com

All Rights Reserved. © 2025. QuillAudits - LLC

Privacy Policy