# Injective SDK Compromised: Cryptocurrency Wallet Stealer Targets DeFi Developers


On June 8, 2026, attackers compromised the GitHub account of a contributor to Injective Labs, one of the blockchain ecosystem's most widely used developer kits. What followed was a textbook supply-chain attack: malicious code pushed to npm, wallet credentials stolen, and a race against time to contain the damage. The incident highlights how a single compromised credential can weaponize a trusted dependency chain affecting tens of thousands of developers and potentially millions in cryptocurrency holdings.


## The Threat


Security companies Socket, Ox Security, and StepSecurity detected malware embedded in version 1.20.21 of the @injectivelabs/sdk-ts npm package—a TypeScript/JavaScript development kit used by cryptocurrency wallet builders, trading platforms, decentralized exchanges, and DeFi applications. The malicious version was designed to intercept and steal cryptocurrency wallet private keys and mnemonic seed phrases at the moment developers use SDK functions to generate or import keys.


Key facts:

  • 50,000 weekly downloads of the Injective SDK
  • 310 confirmed downloads of the compromised version before deprecation
  • 87 direct npm dependencies built on top of the SDK
  • 112,000+ cumulative downloads across dependent packages
  • 17 associated packages also poisoned with the same malicious code

  • The attacker did not trigger the malware at package installation—a detection-evading move that prevented casual package audits from catching the threat. Instead, the payload activated only when developers called specific SDK functions responsible for wallet operations, making it a surgical targeted attack against active DeFi developers rather than a broad spray-and-pray infection.


    ## Background and Context


    Injective is a Layer-1 blockchain specifically designed for decentralized finance. Its ecosystem has grown rapidly, attracting developers building next-generation trading platforms, tokenized assets, and DeFi protocols. The Injective SDK serves as the bridge between these applications and the blockchain—making it a high-value target for attackers seeking access to cryptocurrency holdings.


    The compromise began when an attacker gained access to a legitimate project contributor's GitHub account. On June 8, 2026, malicious commits appeared in the repository. The attacker quickly published the poisoned code as version 1.20.21 to npm, then replicated the attack across 17 other packages in the Injective ecosystem, all pinned to the compromised SDK version to maximize impact across the dependency chain.


    Timeline:

  • June 8 – Malicious commits and npm release (1.20.21)
  • Minutes later – Account owner detects compromise and reverts changes
  • Shortly after – Clean release published (version 1.20.23)
  • June 9 – Security researchers publicly disclose the attack

  • The speed of containment was fortunate but underscores a larger problem: even rapid response leaves a window of exposure, especially for open-source projects where developers automatically pull updates.


    ## Technical Details


    ### How the Malware Worked


    The malware in version 1.20.21 was built to activate selectively. Rather than executing upon package installation (where it would be immediately visible in logs and code reviews), the payload lay dormant until developers called specific wallet-related functions:


  • Key generation functions
  • Key import operations
  • Mnemonic phrase handling

  • This delayed-activation approach is sophisticated. It suggests attackers understood how security teams scan dependencies and deliberately engineered the malware to evade automated detection.


    ### Data Exfiltration


    When triggered, the malware performed the following sequence:


    1. Captured the full mnemonic seed phrase and private key from wallet operations

    2. Encoded sensitive data in base64 format

    3. Queued stolen credentials for approximately 2 seconds, batching multiple captures together

    4. Exfiltrated data via HTTP POST request, embedding the credentials in request headers


    The choice to send data through Injective Labs' own public infrastructure endpoints was deliberate—disguising attacker traffic as legitimate blockchain communication. This obfuscation technique is designed to bypass basic network detection rules that trust Injective-to-client connections.


    ### Scope of Compromise


    The 87 direct dependencies of the Injective SDK create a transitive chain affecting 112,000+ downstream downloads. A developer using any dependent package without pinning to a specific safe version could have pulled the malicious code. The 17 additional poisoned packages multiplied the attack surface.


    Dependency impact:

    | Metric | Value |

    |--------|-------|

    | Direct SDK downloads (compromised version) | 310 |

    | Direct dependencies | 87 |

    | Dependent package downloads (cumulative) | 112,000+ |

    | Poisoned packages (ecosystem-wide) | 17 |


    ## Implications for the Cryptocurrency Ecosystem


    This attack represents a critical shift in threat sophistication. Attackers are no longer targeting individual projects—they're targeting the scaffolding upon which entire sub-ecosystems are built.


    Who was exposed:


  • Wallet developers – Applications handling private key management
  • Trading bot creators – Automated systems requiring wallet access
  • DeFi platform builders – Decentralized exchanges and lending protocols
  • Payment infrastructure – Blockchain-based payment systems
  • End users – Cryptocurrency holders using compromised applications

  • Any developer or end-user who called wallet functions during the brief window when version 1.20.21 was in circulation has potentially exposed their cryptographic credentials. With a mnemonic seed phrase or private key in hand, attackers can port wallets to their own devices and drain assets without detection.


    ### The Supply Chain Trust Problem


    The Injective incident is the latest in an escalating pattern of npm ecosystem compromise:


  • Shai-Hulud malware (April 2026) – compromised 600 npm packages
  • IronWorm malware – hit 36 packages in a coordinated campaign
  • TanStack/Mistral signed malicious packages – exploited developer trust in signed releases

  • Each incident demonstrates that npm's current security model—relying primarily on developer reputation and post-publication detection—cannot keep pace with organized attackers who understand the dependency chain.


    ## Recommendations for Organizations and Developers


    Immediate actions for affected developers:


    1. Identify exposure – Audit your dependencies for @injectivelabs/sdk-ts versions 1.20.21 and any of the 17 associated packages from June 8

    2. Rotate credentials – Transfer cryptocurrency from any wallet created or imported with the compromised SDK to new wallets generated on clean systems

    3. Audit logs – Review application logs and blockchain transaction history for unexpected wallet activity

    4. Update immediately – Upgrade to version 1.20.23 or later after verifying the package hash against official sources

    5. Secret rotation – Regenerate and rotate any secrets, API keys, or credentials that may have been in environment variables during SDK usage


    For security teams:


  • Implement SCA tools – Deploy Software Composition Analysis tools that detect known malicious packages in real time (Socket, Snyk, Dependabot can catch these faster than manual review)
  • Pin dependencies – Use exact version pinning in production rather than allowing automatic minor/patch updates
  • Monitor npm registry – Subscribe to npm security advisories and establish alerting on package updates for high-risk dependencies
  • Transitive dependency scanning – Don't stop at direct dependencies—audit the full tree of transitive dependencies
  • Code review SDKs – For critical wallets and financial applications, conduct code reviews of SDK dependencies before initial release

  • For npm and the ecosystem:


  • Faster removal – The malicious package was deprecated but not removed; npm should implement rapid removal for confirmed malware with guaranteed artifact purging
  • Immutable releases – Version artifacts should be cryptographically signed and verified at install time
  • Enhanced account protection – Require 2FA and hardware key verification for high-download packages

  • ## HackWire Analysis


    Supply-chain attacks have become the dominant threat model in open-source security, and the Injective SDK incident reveals how far attackers have evolved their tradecraft. Previous npm attacks relied on volume (Shai-Hulud's 600 packages) or social engineering. This attack shows surgical precision: target one high-value maintainer, compromise a specific dependency chain, weaponize the SDK to steal cryptocurrency credentials, and use Injective's own infrastructure to hide the exfiltration.


    The 310 downloads of version 1.20.21 represent a terrifyingly small footprint that could translate to catastrophic losses. A single DeFi application developer pulling this version into a production wallet could expose millions of dollars in user assets. What's more telling is the sophistication of the malware's design—the delayed activation and queued exfiltration suggest this was not a script-kiddie attack but an organized operation with deep knowledge of both npm ecosystem practices and blockchain wallet architecture.


    The fact that the malicious GitHub artifacts remain available and the npm package is merely deprecated (not deleted) compounds the risk. Developers searching npm history, copying code from documentation, or rolling back to "older stable" versions could inadvertently reintroduce the malware months from now. This is not a quick-and-dirty attack; it's a persistent threat that will remain dormant in copy-pasted code and archived repositories.


    The pattern is clear: cryptocurrency-focused supply-chain attacks are now a specialized threat vector attracting well-resourced adversaries. Wallet builders, exchanges, and DeFi developers must treat their dependency chains with the same rigor as authentication and cryptography. For the broader ecosystem, this is a call to move beyond post-publication detection toward pre-publication verification, mandatory 2FA for high-impact packages, and faster removal of confirmed malware from registries.


    — *HackWire Editorial*


    ## Related Coverage


  • Read more in our [Breaches](https://www.hackwire.news/category/breaches) coverage
  • Cross-reference with [Vulnerabilities](https://www.hackwire.news/category/vulnerabilities) and [Malware](https://www.hackwire.news/category/malware)
  • Stay current via the [HackWire homepage](https://www.hackwire.news/)