Copy
Trading Bots
Events
More

Hackers backdoor Injective npm package for wallet keys

2026/07/10 11:24Browse 0

A compromised GitHub maintainer account allowed attackers to push malicious code to the Injective TypeScript SDK on July 8, 2026, targeting wallet private keys. The poisoned version 1.20.21 of @injectivelabs/sdk-ts was live for 17 minutes before security researchers flagged it, but the window was enough to potentially compromise developers who installed it.

How the attack unfolded

The attackers took over the account of maintainer thomasRalee, gaining direct push access to the master branch without code review. Between 20:24 and 20:59 UTC, they pushed malicious commits that introduced a backdoor into the SDK. The tainted version was then propagated across 18 associated npm packages, each pinned to that exact release.

Instead of using common post-install hooks, which security tools typically catch, the attackers employed runtime injection. The malicious code didn't execute during installation but when users interacted with their wallets. It specifically targeted the PrivateKey.fromMnemonic() function, which processes BIP-39 seed phrases. When triggered, the code captured the mnemonic or private key and exfiltrated it via a POST request with encoded headers to blend in with normal traffic.

Supply-chain risk remains

Security researchers from StepSecurity and Socket identified the attack and triggered a revert commit, restoring clean packages roughly 49 minutes after the initial malicious push. No widespread theft has been confirmed. However, the attack vector highlights a persistent vulnerability in crypto's software supply chain: a single compromised maintainer account can lead to a backdoor affecting an entire SDK ecosystem.

Cached packages pose an ongoing risk. Developers who installed version 1.20.21 during the 17-minute window, or whose CI/CD pipelines cached it, may still be running compromised code. Lock files and package caches do not automatically update when a registry version is removed.

What developers should do now

For those building on Injective or using any of the 18 affected packages, the immediate step is auditing dependency lock files for version 1.20.21. The clean release is tagged 1.20.23. Any application that used the affected version during the live window should be treated as potentially compromised until confirmed otherwise. Implementing multi-factor authentication on all maintainer accounts, mandatory code review for commits touching cryptographic functions, and automated dependency scanning that flags runtime behavior would each have made this attack significantly harder to execute.

Disclaimer: This page may contain third-party information and does not necessarily reflect BYDFi's views or opinions. This content is for general reference only and does not constitute any representation, warranty, financial advice, or investment advice. BYDFi is not responsible for any errors, omissions, or any results arising from the use of such information. Virtual asset investments involve risks. Please carefully evaluate the risks of the product and your risk tolerance based on your financial situation. For more information, please refer to our Terms of Use and Risk Disclosure.