@injectivelabs/sdk-ts: hijacked 1.20.21 release harvests wallet mnemonics and private keys
Severity: critical · Patch status: patched · Since 2026-07-08
On 2026-07-08 a malicious @injectivelabs/sdk-ts 1.20.21 was published to npm under Injective Labs' own package name. It followed commits pushed straight to the main branch of the official repository; the commits are unsigned, and Datadog assesses they were made by an attacker using a developer account. The release added a 'key derivation telemetry' hook to PrivateKey.fromMnemonic and fromHex. The hook base64-encodes the full seed phrase or hex private key and POSTs it, disguised as gRPC-web traffic, to an endpoint on testnet.archival.chain.grpc-web.injective.network. It runs when a program derives keys through the library, not at install time. The bad version was live for about 49 minutes. A revert commit and a clean 1.20.23 release followed the same evening. Ten companion @injectivelabs packages whose 1.20.21 manifests pin sdk-ts 1.20.21 can pull the malicious code in transitively, and the registry now carries a security deprecation on the companion 1.20.21 entries. The maintainer acknowledged a community report on GitHub within twelve minutes. Any seed phrase or private key that passed through 1.20.21 should be treated as exposed and rotated from a clean machine. The sources reviewed describe no confirmed victim data.
What to do
- Remove @injectivelabs/sdk-ts 1.20.21 and any @injectivelabs/* 1.20.21 companion from projects and lockfiles; upgrade to 1.20.23 or later
- Treat every seed phrase or private key that passed through 1.20.21 (fromMnemonic / fromHex) as exposed: rotate from a clean machine, and move funds to new keys where possible
- Block and hunt egress to testnet.archival.chain.grpc-web.injective.network, the sole published C2 host (OSV, Datadog)
- Review wallet activity for keys derived through 1.20.21 for transactions you did not authorise
- Rebuild CI and developer images that installed 1.20.21 from trusted sources and audit dependent repositories
Fixed versions
Sources
All live incidents on Threat Watch