
Compromised @injectivelabs/sdk-ts exfiltrates wallet keys through fake telemetry
Aikido details a compromise of @injectivelabs/sdk-ts (~50,000 weekly downloads), where a hijacked maintainer account published version 1.20.21 containing hooks in PrivateKey.fromMnemonic and PrivateKey.fromHex that capture wallet mnemonics/private keys and exfiltrate them via a POST request disguised as Injective gRPC-web traffic (X-Request-Id header, char-code-obfuscated domain). The attacker simultaneously republished 17 other @injectivelabs-scoped packages pinned to the poisoned SDK version, so any downstream project resolving those transitively pulled the stealer without naming sdk-ts directly. The malicious version was live under an hour, downloaded 310 times, and has since been patched (1.20.23), though the compromised release artifacts remained on GitHub at time of writing.
What it is
A supply-chain compromise of @injectivelabs/sdk-ts v1.20.21, published to npm at 22:59 GMT+2 on June 8, 2026 via commits from an established maintainer's GitHub account (pointing to account takeover, not a drive-by). It steals wallet mnemonics and private keys. Beyond the summary: the malicious code lives in two build artifacts, dist/cjs/accounts-Cy0p4lLW.cjs and dist/esm/accounts-jQ1GSgaW.js, byte-identical to the clean 1.20.23 build except for one injected block (falsely labeled src/utils/key-derivation-telemetry.ts) and two one-line hooks.
How it works
The hooks sit inside PrivateKey.fromMnemonic and PrivateKey.fromHex and fire before the real derivation, so every legitimate call leaks the secret. Records are tagged fm (mnemonic) or fh (hex) so the operator knows what each holds, queued, then flushed on a 2-second debounced timer: joined with |, base64-encoded, and sent.
The exfil detail the summary understates: the stolen blob rides in the X-Request-Id request header, not the body, with content type application/grpc-web+proto and (on the Node path) a zero-length body — so on the wire it mimics a normal gRPC-web call carrying a request ID. Every failure path is a silent empty catch. The destination host is stored as character codes and rebuilt at runtime, defeating plaintext bundle searches.
Preconditions / Affected
- Any project resolving
@injectivelabs/sdk-ts@1.20.21, directly or transitively. The other 17 republished scope packages (e.g.@injectivelabs/wallet-core@1.20.21) have unmodified source but hard-pin the poisoned SDK — auditing only direct dependencies will miss this. - Triggers only at runtime on key derivation. There are no install hooks; the
scriptsblock is empty, so postinstall scanners and sandboxes see a clean package.
What to do
- Check for any
@injectivelabs/*at version1.20.21anywhere in the resolved tree, including transitive pins. - Upgrade to a clean release (the maintainer published
1.20.23; the reverted fix landed 23:48 GMT+2 on June 8). - Treat any mnemonic or private key that passed through these packages as exposed. Per the page, the order matters: move the funds first, then rotate keys and seed phrases.
- Aikido users: filter the central feed on malware issues; this surfaces as a 100/100 critical issue.
Caveats
Containment is incomplete. As of the report the malicious 1.20.21 was deprecated but not removed from npm, so it remains downloadable, and the compromised release artifacts were still present on the project's GitHub releases page. Only 310 downloads occurred before the pull (against ~50k weekly / 87 dependents), but the window doesn't bound your exposure if a lockfile already captured it.
Organisations named here
Technologies named here
- Aikido
- @injectivelabs/sdk-ts
- Aikido Device Protection
- @injectivelabs/utils
- @injectivelabs/networks
- Aikido Safe Chain
- @injectivelabs/ts-types
- @injectivelabs/exceptions
- @injectivelabs/wallet-base
- @injectivelabs/wallet-core
- @injectivelabs/wallet-cosmos
- @injectivelabs/wallet-private-key
- @injectivelabs/wallet-evm
- @injectivelabs/wallet-trezor
- @injectivelabs/wallet-cosmostation
- @injectivelabs/wallet-ledger
- @injectivelabs/wallet-wallet-connect
- @injectivelabs/wallet-magic
- @injectivelabs/wallet-strategy
- @injectivelabs/wallet-turnkey
- @injectivelabs/wallet-cosmos-strategy
- npm
- Node.js
- TypeScript
- Ethereum
- Aikido Security
Techniques named here
- Supply chain compromise via npm package hijack
- Malicious code disguised as telemetry
- Hooking key derivation functions
- Runtime trigger instead of install-time script
- String/domain obfuscation
- Exfiltration domain mimicking legitimate infrastructure
- Data exfiltration via HTTP header
- Debounced batching of stolen data
- Silent failure handling
- Transitive dependency pinning for amplification
- Account Takeover
Threat actors named here
- Unidentified attacker/operator
Also named here
- testnet.archival.chain.grpc-web.injective.network
Related in Supply Chain


