Injective npm Package Supply Chain Attack: What Developers Need to Know

Última actualización: 07/10/2026
  • Attackers compromised a maintainer's GitHub account to publish malicious @injectivelabs/sdk-ts version 1.20.21.
  • The backdoor captured wallet private keys and seed phrases, exfiltrating them via a fake telemetry endpoint.
  • The malicious code was live for under an hour, affecting 18 packages; no funds were lost.
  • Developers should upgrade to version 1.20.23 and treat any credentials processed during the window as compromised.

Injective npm package

On July 8, 2026, a supply chain attack hit the Injective blockchain ecosystem when an attacker hijacked a trusted maintainer’s GitHub account and pushed malicious code into the official TypeScript SDK. The compromised version, @injectivelabs/sdk-ts 1.20.21, was designed to quietly steal cryptocurrency wallet private keys and mnemonic seed phrases from any application that used it. The malicious release stayed live for less than an hour before being detected and reverted, but not before it was downloaded over 300 times and pinned across 17 other packages in the same npm scope.

Security firms Socket, Ox Security, and StepSecurity flagged the incident almost immediately. The Injective team responded by deprecating the bad version and pushing a clean release, 1.20.23. Despite the scare, Injective CEO Eric Chen confirmed that no funds on the network were at risk, and there are no reports of actual asset theft. Still, developers who may have used the affected packages during that window are urged to treat any wallet credentials as exposed and rotate them immediately.

auditoría de seguridad npm
Related article:
Deep guide to npm security auditing and supply‑chain attacks

How the Attack Unfolded

The attacker gained write access to the InjectiveLabs/injective-ts GitHub repository through the account of an established contributor, thomasRalee. Instead of using a stolen npm token, the attacker leveraged the repository’s own trusted-publisher pipeline (OIDC) to publish the malicious version. Two commits were pushed directly to the master branch without a pull request, adding a new file called key-derivation-telemetry.ts that looked like a harmless analytics helper.

The file contained a JSDoc comment describing it as “anonymized usage metrics for SDK optimization,” but underneath it hid a character-code array that, when decoded, revealed a URL: testnet.archival.chain.grpc-web.injective.network. This domain was crafted to blend in with legitimate Injective infrastructure, making the exfiltration traffic hard to spot. The payload hooked into the PrivateKey.fromMnemonic() and PrivateKey.fromHex() methods, capturing the full seed phrase or private key every time a wallet was created or loaded.

Instead of sending data immediately, the backdoor queued multiple secrets for two seconds, then base64-encoded them and sent them as an HTTPS POST with the stolen data hidden in the X-Request-Id header. The body was empty, and the Content-Type was set to application/grpc-web+proto to mimic real gRPC-Web calls. Any errors were silently swallowed, so the calling application never noticed a thing.

npm security
Related article:
npm security under pressure: wormable attacks, maintainer phishing, and GitHub’s tightened rules

Affected Packages and Reach

The malicious version 1.20.21 was published across all 18 packages in the @injectivelabs scope that share the same monorepo release train. While only @injectivelabs/sdk-ts contained the actual backdoor code, the other 17 packages pinned an exact dependency on it, meaning installing any one of them would also pull in the compromised SDK. Security researchers identified 87 downstream dependent packages that could have been indirectly exposed, with a cumulative download count of over 112,000.

The package normally sees about 50,000 weekly downloads on npm. The malicious version was downloaded 310 times before it was deprecated. Many of those downloads likely came from automated bots, mirror services, or security scanners rather than active developer projects, which helps explain why no actual theft has been reported.

Timeline and Detection

The first suspicious commit appeared on July 8, 2026, at 20:24 UTC. The attacker made three commits in quick succession, with the final one triggering the automated publish pipeline. The malicious release was live for approximately 49 minutes before the legitimate maintainer detected the intrusion, reverted the changes, and published version 1.20.23. The revert commit deleted the telemetry file and removed all call sites from the codebase.

Ataque de cadena de suministro de Miasma e IronWorm en paquetes npm
Related article:
The Miasma and IronWorm NPM Campaign: A Deep Dive into Supply Chain Chaos

Despite the quick response, the compromised package remained on npm as a deprecated download, and the malicious GitHub release artifacts are still accessible. This means any developer who cached the package or installed it during that window could still be at risk if they haven’t updated to the clean version.

What This Means for Developers

This attack is a textbook example of a software supply chain compromise targeting the developer toolchain rather than the blockchain itself. The attackers didn’t break Injective’s cryptography or smart contracts; they went after the SDK that developers use to build wallets, exchanges, and DeFi applications. Similar attacks have been on the rise, with the Security Alliance reporting an increase in malicious npm packages distributed through GitHub, npm, and other package registries.

For developers working with Injective or any other blockchain, the practical takeaways are clear: pin your dependencies, use lockfiles, enable two-factor authentication on every account that touches your publishing pipeline, and monitor repository commits with the same vigilance you’d apply to your production servers. If you used any of the affected packages between July 8 and July 9, 2026, treat all wallet credentials processed during that time as compromised and move your funds to new wallets immediately.

The incident serves as a reminder that even well-maintained open-source projects can be vulnerable when a single maintainer account is compromised. The Injective team’s rapid response and transparent communication helped contain the damage, but the broader crypto ecosystem must remain on guard against similar attacks targeting the tools developers rely on every day.

problemas al usar npm
Related article:
Common npm Problems and How to Fix Them Safely
Related posts: