Cremit
/incidentsfield log
탐지캠페인유출지패턴LLM사고 사례방법론
↺rss↗cremit.io

incidents.cremit.io

실제 발생한 비인간 식별자(NHI) 크리덴셜 유출 사고를 정리한 인덱스. 운영: Cremit

둘러보기

  • 전체 사고
  • npm 공급망
  • CI/CD 침해
  • 방법론

구독

  • RSS 피드
  • @cremit_io
  • GitHub
// 상태
모니터 가동중
// 빌드
2026-05-20
// 출처
cremit · 서울, 대한민국
// 라이선스
CC BY 4.0

© 2026 Cremit. 출처 표시 시 자유롭게 재사용 가능.

홈/사고/solana-web3-private-key-stealer-2024
CRITICAL8.4·confirmed·공개 Dec 3, 2024·5분 분량

@solana/web3.js Private Key Exfiltration (2024)

Compromised maintainer publish credentials were used to push two malicious versions of the official @solana/web3.js npm package, embedding a routine that exfiltrated private keys from any wallet using the SDK.

Summary

On December 2–3, 2024, attackers compromised publish credentials for the official @solana/web3.js JavaScript SDK and shipped two malicious versions — 1.95.6 and 1.95.7 — containing code that exfiltrated private keys from any application that initialized a Keypair while running the affected versions. The package is the canonical client library for the Solana blockchain and is consumed by wallets, exchanges, dApps, and bots across the ecosystem. The compromise window was approximately five hours.

Timeline

  • 2024-12-02 ~15:20 UTC — Malicious @solana/web3.js@1.95.6 published.
  • 2024-12-02 ~17:01 UTC — 1.95.7 published.
  • 2024-12-02 evening — Anomalous private key activity reported by downstream consumers via Solana developer forums.
  • 2024-12-03 ~early UTC — Both versions removed by npm; clean 1.95.8 published.
  • 2024-12-03 — Anza (the development collective maintaining the SDK) publishes the official advisory.

Attack Vector

The compromise was credential-based — the publish credentials of a @solana/web3.js maintainer were obtained, with the public advisory describing the credentials as having been phished. The technical payload chain:

  1. Attacker logs into the npm account using stolen credentials.
  2. Attacker publishes patch versions injecting a small, well-targeted code block into the SDK.
  3. The injected code modifies the Keypair initialization path so that whenever a private key is created or loaded, the key is also POSTed to an attacker-controlled exfiltration endpoint.
  4. The endpoint quietly collected keys for hours before defender attention triggered the takedown.

The attack is unusually surgical compared to the broad credential-vacuums of ua-parser-js or the Shai-Hulud campaign. The payload targets exactly one credential type — Solana private keys — because the package is exactly the right surface for that target.

Tokens & Credentials Exposed

  • Solana private keys initialized or loaded by any application running the affected SDK versions.
  • For wallet applications, this includes user wallet keys.
  • For backend services, this includes hot-wallet keys, signer keys, and program upgrade authority keys.
  • For automated bots (arbitrage, MEV, oracle nodes), this includes the operational keys controlling on-chain assets and authority.

A Solana private key is structurally a signing key with full authority over whatever assets and programs it controls. There is no "read-only" mode; a captured key is an actionable credential the moment it lands at the attacker.

Confirmed Impact

  • Approximately $160,000+ in initial confirmed thefts in the immediate aftermath (numbers continued to grow as affected applications discovered drained accounts post-disclosure).
  • Multiple bot operators and small-scale dApps confirmed key exfiltration and asset loss. Larger exchanges generally use HSM-backed signing for hot wallets and were not directly affected.
  • Wallet vendors that bundle @solana/web3.js audited their releases for the affected window. Several published advisories asking users to confirm whether they had updated to the affected versions during the exposure window.

The structural impact is larger than the immediate financial loss: the incident demonstrated that targeting a domain-specific SDK is a viable attack pattern when the credential type is high-value enough to justify the precision.

Mitigation & Lessons

If you operate any application using @solana/web3.js:

  • Confirm your installed version was not 1.95.6 or 1.95.7 during the exposure window. If it was, treat every Solana private key the application initialized in that window as compromised.
  • Rotate exposed keys immediately by transferring assets to a new keypair and updating any program authority assignments.
  • Audit lockfile pinning practices. Projects that pinned @solana/web3.js to a specific patch version were unaffected. Projects that allowed automatic patch upgrades during the window were the primary exposure surface.

Wider lessons:

  • Domain-specific SDKs are high-value supply chain targets. A package that is consumed only by Solana developers is a small fraction of the npm ecosystem by download count, but every install hits a wallet of some kind. Blast radius is not a function of download count alone — it is a function of what the install reaches.
  • Lockfile pinning and provenance attestations are now baseline expectations for cryptocurrency-handling applications.
  • MFA enforcement on maintainer accounts for high-blast-radius packages is the single most effective control. The 2024 incident happened despite npm's general MFA push — phishing remains the dominant bypass vector.

Cremit Analysis

This is ghost-key with a sharper edge than the broader npm credential incidents.

Ghost Key: the maintainer's npm credential is the only identity gating publish access to a package controlling a substantial fraction of the Solana ecosystem's client-side cryptography. There is no operational signal that distinguishes a legitimate publish from an attacker's publish other than the credential itself.

Drifted Key: @solana/web3.js was originally a developer-experience SDK; by 2024 it had drifted into the dependency tree of consumer wallets, automated trading systems, and on-chain infrastructure controlling material funds. The trust posture appropriate for a developer SDK is wildly inappropriate for a package that handles signing material in production.

The NHI Severity Index score of 8.4 reflects ecosystem-wide reach within the Solana ecosystem (the SDK is the canonical library), production reachability (every install touches active signing keys), and admin-level privilege (a captured private key has full authority over the assets it controls). The score is slightly below ua-parser-js because the blast radius is bounded to one ecosystem rather than the entire JavaScript world — but the per-credential value is substantially higher.

The generalizable lesson: the attack surface is not where the value is stored, it is where the value moves. Solana wallets store private keys in hardware enclaves, encrypted local storage, or HSMs. The keys move through @solana/web3.js every time they are used. Attacking the path of motion is structurally easier than attacking the storage. This is the same pattern Shai-Hulud applied to CI runner credentials in 2025–2026.


참고 자료

  1. [1]
    Anza Security Advisory — @solana/web3.js incident
    primary·2024-12-03·github.com
  2. [2]
    Socket.dev — @solana/web3.js compromise analysis
    analysis·2024-12-03·socket.dev
  3. [3]
    Malicious @solana/web3.js versions used in supply chain attack
    reporting·2024-12-03·bleepingcomputer.com

관련 사고

2018-11-26·HIGH
event-stream / flatmap-stream Backdoor (2018)
2021-10-22·CRITICAL
ua-parser-js npm Account Compromise (2021)
2021-11-04·CRITICAL
rc and coa Coordinated npm Account Takeover (2021)
2026-04-22·CRITICAL
Bitwarden CLI Supply Chain Compromise (2026)
최종 검토 / 2026-05-04검토자 / ben라이선스 / CC BY 4.0
// 사고 메타데이터
심각도
CRITICAL8.4
상태
confirmed
공개
2024-12-03
발생
2024-12-02 → 2024-12-03
벡터
npm supply chain
플랫폼
npm
토큰
Signing KeyAPI Key (generic)
nhi severity index
점수8.4 / 10blast radiusecosystem-widereachabilityproduction권한admin
nhi kill chain
Ghost Key↗Drifted Key↗
지표
노출 기간1일