Injective Labs GitHub Repository Compromised in Supply Chain Attack
Unknown threat actors compromised the Injective Labs SDK project's GitHub repository, leveraging it to publish a malicious package on the npm registry. The package, @injectivelabs/sdk-ts@1.20.21, was designed to steal cryptocurrency wallet private keys and mnemonic seed phrases by embedding fake telemetry functionality.
Released on July 8, 2026, the compromised version has since been deprecated on the registry. However, the release artifacts remain available for download from GitHub as of the latest reports.
How the Attack Was Executed
The malicious functionality was introduced through commits submitted by a GitHub account belonging to a developer with an established history of contributions to the repository. The attacker exploited the repository's trusted-publisher (OIDC) pipeline, authoring and pushing malicious commits under the identity of an existing, trusted maintainer named 'thomasRalee.'
The compromised package was also published across 17 additional @injectivelabs scoped packages, affecting transitive users who may not have directly installed the library. These packages include:
- @injectivelabs/utils
- @injectivelabs/networks
- @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
Malware Functionality
The malware within the package is designed to exfiltrate sensitive data without triggering suspicion. It modifies legitimate functions used in workflows to generate private keys by invoking a 'trackKeyDerivation()' function, disguised as a tool for collecting anonymized usage metrics for SDK optimization.
The function captures parameters, including the method used to generate the private key and the actual sensitive information needed for key generation. This data is sent to an external server via HTTPS POST requests, allowing the attacker to regenerate the private keys.
Recommendations for Affected Users
Users who have installed the malicious version are advised to:
- Update to the newly published, clean version of the package (1.20.23).
- Treat any private key or mnemonic phrase passed through the compromised package as compromised and rotate them immediately.
- Check for transitive dependencies to ensure no other compromised packages are in use.
Industry Insights
Security firms, including Socket and OX Security, have analyzed the attack, highlighting its sophistication and potential impact on the cryptocurrency ecosystem. The incident underscores the growing threat of supply chain attacks in the software development landscape.
This attack serves as a reminder for developers and organizations to vigilantly monitor their repositories and dependencies for signs of compromise.