Injective SDK npm Supply Chain Attack: Crypto Wallet Keys Stolen via Compromised Package
Threat actors compromised a legitimate GitHub contributor account for the Injective Labs SDK project and published a malicious npm package that steals cryptocurrency wallet private keys and mnemonic seed phrases. The attack affected version 1.20.21 of the @injectivelabs/sdk-ts package, which receives roughly 50,000 weekly downloads, along with 17 related packages pinned to the same malicious version.
What Happened: Injective SDK npm Supply Chain Attack Steals Crypto Wallet Keys
On June 8, 2026, attackers used a compromised GitHub account belonging to an established contributor of the Injective Labs SDK repository to push malicious code. The account had a history of legitimate contributions, which helped the attacker avoid immediate detection.
The attackers first created a branch named test-backdoor-check to probe access and permissions. Shortly afterward, they published version 1.20.21 of the @injectivelabs/sdk-ts package on npm with embedded crypto-stealing functionality. Furthermore, they published the same compromised version for 17 additional packages associated with the Injective ecosystem. All of these secondary packages were modified to explicitly pin their dependency on the malicious SDK version.
The legitimate account owner detected the compromise within minutes, reverted the changes, and published a clean release, version 1.20.23. However, the malicious version remained available on npm and was downloaded 310 times before deprecation. The malicious GitHub release artifacts are reportedly still available as of this writing.
Technical Details of the Injective SDK npm Supply Chain Attack
The attack leveraged a compromised GitHub account with existing write access to the official Injective Labs repository. Because the account had a legitimate contribution history, the suspicious commits did not trigger automated alerts or manual reviews.
However, the malware was not a typical supply-chain payload that activates upon installation. Instead, it used a more targeted approach. The malicious code injected fake telemetry functionality into the SDK’s wallet-handling logic. When developers called functions that generate or import wallet keys, the malware captured the full mnemonic seed phrase and private key.
The stolen data was encoded in base64 and exfiltrated via an HTTP POST request to an endpoint masquerading as a legitimate Injective Labs public infrastructure service. The attackers bundled multiple stolen keys and queued them for two seconds before sending. This delay was likely designed to reduce network noise and evade heuristic detection systems.
The following 18 packages were affected:
@injectivelabs/sdk-ts1.20.21@injectivelabs/utils1.20.21@injectivelabs/networks1.20.21@injectivelabs/ts-types1.20.21@injectivelabs/exceptions1.20.21@injectivelabs/wallet-base1.20.21@injectivelabs/wallet-core1.20.21@injectivelabs/wallet-cosmos1.20.21@injectivelabs/wallet-private-key1.20.21@injectivelabs/wallet-evm1.20.21@injectivelabs/wallet-trezor1.20.21@injectivelabs/wallet-cosmostation1.20.21@injectivelabs/wallet-ledger1.20.21@injectivelabs/wallet-wallet-connect1.20.21@injectivelabs/wallet-magic1.20.21@injectivelabs/wallet-strategy1.20.21@injectivelabs/wallet-turnkey1.20.21@injectivelabs/wallet-cosmos-strategy1.20.21
The C2 server used by the malware was obfuscated in the payload and resolved to testnet.archival.chain.grpc-web.injective.network.
Business and Operational Impact
The impact of this supply-chain attack extends beyond direct cryptocurrency losses. Organizations using the Injective SDK in production face multiple categories of risk:
- Cryptocurrency theft: Attackers with stolen private keys and mnemonics can port wallets to their own devices and transfer digital assets without the owner’s knowledge.
- Developer tool compromise: Any developer workstation that installed the malicious package may have had wallet keys exfiltrated, including keys for testnet and mainnet environments.
- Downstream dependency risk: The 87 dependent packages had a cumulative download count exceeding 112,000. Projects using non-pinned versions automatically pulled the malicious update during the exposure window.
- Reputational damage: Projects built on Injective that inadvertently distributed the malicious SDK may face loss of user trust and regulatory scrutiny.
- Supply-chain trust erosion: This incident demonstrates that even established contributors with verified histories can be compromised, undermining assumptions about trusted open-source maintainers.
Mitigation and Recommendations
Immediate Actions for Defenders
- Audit your dependency tree for any pinned or resolved versions of
@injectivelabs/sdk-ts@1.20.21and the 17 related packages listed above. Remove or upgrade immediately. - If your project or developers installed the affected version, assume wallet keys may have been compromised. Transfer any cryptocurrency holdings to newly generated wallets with fresh mnemonic phrases.
- Rotate all secrets, API keys, and credentials in environments where the malicious package was present, including CI/CD pipelines and developer workstations.
- Review GitHub repository access controls and audit all accounts with write access, especially those with publish permissions to npm.
Long-Term Supply Chain Hardening
Furthermore, organizations should adopt the following practices to reduce future supply-chain exposure:
- Pin all production dependencies to exact versions and verify checksums before deployment.
- Use private registries or scoped namespace controls to gate access to trusted package sources.
- Enable automated dependency scanning with tools like Socket, Snyk, or GitHub Dependabot to detect anomalous package behavior.
- Mandate multi-factor authentication for all npm and GitHub accounts with publish permissions.
- Implement commit signing and branch protection rules requiring reviews for all changes to release branches.
Bottom line: This attack shows that supply-chain threats do not require advanced zero-days. A compromised contributor account and a few minutes of access were enough to publish a malicious package to 50,000 weekly users. Pin your dependencies, monitor for anomalies, and treat every npm install as a potential risk surface.
Summary
| Incident: | Injective SDK npm Supply Chain Attack |
| Affected Package: | @injectivelabs/sdk-ts version 1.20.21 |
| Related Packages: | 17 additional @injectivelabs scoped packages pinned to v1.20.21 |
| Disclosure Date: | July 9, 2026 |
| Attack Date: | June 8, 2026 |
| Weekly Downloads: | ~50,000 (primary package) |
| Dependent Packages: | 87 packages, 112,000+ cumulative downloads |
| Malicious Downloads: | 310 downloads before deprecation |
| Attack Vector: | Compromised GitHub contributor account → malicious npm publish |
| Payload: | Crypto wallet private key and mnemonic exfiltration via fake telemetry |
| Exfiltration Method: | HTTP POST to attacker-controlled endpoint mimicking legitimate infrastructure |
| C2 Domain: | testnet.archival.chain.grpc-web.injective.network |
| Patch Status: | Clean version 1.20.23 published; malicious version deprecated but not removed |
References
- Socket, “Compromised Injective SDK npm Package Exfiltrates Wallet Keys and Mnemonics,” July 9, 2026, https://socket.dev/blog/compromised-injective-sdk-npm-package, accessed July 9, 2026.
- Ox Security, “Injectivelabs npm Package Hijacked, Impacting 87 Dependent Packages,” July 9, 2026, https://www.ox.security/blog/injectivelabs-npm-package-hijacked-impacting-87-dependent-packages/, accessed July 9, 2026.
- StepSecurity, “Injective npm Supply Chain Attack: 18 Packages Backdoored to Steal Crypto Wallet Keys,” July 9, 2026, https://www.stepsecurity.io/blog/injective-npm-supply-chain-attack-18-packages-backdoored-to-steal-crypto-wallet-keys, accessed July 9, 2026.
- BleepingComputer, “Injective SDK on npm infected with cryptocurrency wallet stealer,” July 9, 2026, https://www.bleepingcomputer.com/news/security/injective-sdk-on-npm-infected-with-cryptocurrency-wallet-stealer/, accessed July 9, 2026.
- The Hacker News, “npm 12 Disables Install Scripts by Default to Reduce Supply Chain Risk,” July 9, 2026, https://thehackernews.com/2026/07/npm-12-disables-install-scripts-by.html, accessed July 9, 2026.