Malicious code in node_cryptography (npm)
The npm package node_cryptography contains malicious code that exfiltrates cryptographic and wallet material passed to its exported function to an attacker-controlled server. The code is obfuscated using obfuscator.io to hide the destination URL from inspection.
- Disclosed
- Last updated
- Blast radius
- Unknown; depends on adoption of node_cryptography package
- Ecosystems
- Attack vectors
- Affected entities
- node_cryptographynpm package presenting as Node.js cryptography helper
The npm package node_cryptography was published with malicious code designed to steal sensitive cryptographic inputs. The package presents itself as a Node.js cryptography helper and depends on ethers, encouraging users to pass cryptographic or wallet material to its sole exported async function.\n\nThe malicious function forwards the caller's arguments via axios to an attacker-controlled API endpoint. The destination URL is assembled at runtime from approximately 13 fragments produced by an obfuscator.io RC4 string-array decoder, deliberately obscuring the exfiltration target.\n\nThe entire ~30 KB index.js file is wrapped in the standard obfuscator.io scheme (RC4+base64 string array, hex-escaped literals, wrapped index accessors, array-rotation IIFE, and a self-defending RegExp function-body anti-tamper check). Users of the package are not informed of this data exfiltration and have no configuration option to prevent it.\n\nThe incident was identified by the OpenSSF malicious-packages project and reported via GitHub Security Advisory GHSA-3pcp-c87m-gmcr.
Indicators of compromise
- Packages
- node_cryptography
Remediation
- Remove node_cryptography from all projects immediately
- Audit any cryptographic keys, wallet seeds, or sensitive material that may have been passed to node_cryptography functions
- Rotate any compromised cryptographic credentials or wallet keys
- Review package dependencies to ensure no other malicious packages are present
- Use npm audit and supply chain security tools to detect similar obfuscated malicious packages
Sources
- GitHub Advisory GHSA-3pcp-c87m-gmcr · GitHub Advisory Database
Cite this entry
"Malicious code in node_cryptography (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-node-cryptography-npm-dfsbkr
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in rust-testing-utils (npm)
The npm package rust-testing-utils contained malicious code that impersonates the pino logger and executes remotely-fetched code with arbitrary privileges. The package spawns a child process that decodes a hardcoded URL, fetches attacker-controlled content, and executes it via Function constructor with full module-loading capability.
npmCompromised packageMalicious commit - resolvedcritical
Malicious code in @syncraft-labs/core (npm)
The npm package @syncraft-labs/core contained obfuscated malicious code in its ESM build that executes on import, fetching and executing attacker-controlled payloads from Ethereum blockchain via JSON-RPC endpoints. The CommonJS build was clean, indicating targeted injection into the ESM entry point.
npmCompromised packageMalicious commit - resolvedcritical
Malicious code in localize-translate (npm)
The npm package localize-translate contained malicious code in its postinstall lifecycle script that collected host identifiers and beaconed them to an attacker-controlled endpoint (gigww0v7.instances.poc.jchunt.top) without user consent. The reconnaissance callback fired automatically on every installation, collecting hostname, platform, architecture, Node version, package name, and timestamp.
npmCompromised packageMalicious commit - containedcritical
Malicious code in mutex-plus (npm)
The npm package mutex-plus contains hidden malicious code that enables remote code execution when a callback object with a specific jobId hash is passed to runExclusive(). The payload is encrypted at rest in lib/plusMutex.min.js and decrypted using the jobId as a key, then executed as a detached Node.js process.
npmCompromised packageMalicious commit