Malicious code in @js-lib-team/env-parser (npm)
The npm package @js-lib-team/env-parser contains malicious code that executes on module load, stealing private keys and wallet mnemonics from the installer's environment and local.env file, then transfers cryptocurrency balances to attacker-controlled addresses across multiple blockchain networks.
- Disclosed
- Last updated
- Blast radius
- Any developer or system that installs and requires @js-lib-team/env-parser; wallet funds on multiple blockchain networks (Ethereum, Binance Smart Chain, Polygon, Avalanche, and others) are at immediate risk of theft.
- Ecosystems
- Attack vectors
- Affected entities
- @js-lib-team/env-parsernpm package containing malicious code that steals wallet keys and transfers funds to attacker addresses
The npm package @js-lib-team/env-parser is advertised as an environment-variable parser but contains malicious code that executes immediately upon require/import. The package's index.js contains a top-level IIFE that reads the installer's local.env file and extracts values matching patterns for PRIVATE_KEY, SECRET, and MNEMONIC using a 64-hex regex.
Once wallet key material is extracted, the malicious code constructs ethers.Wallet instances and uses them to sign and broadcast transactions that transfer native-token balances (ETH, BNB, Polygon, Avalanche, and other supported chains) from the installer's wallets to five hardcoded attacker-controlled destination addresses, including 0x70951410C5E9E938D8715288A7229548287a1a62 and bc1q4h4a2sjf4k9quhx7xrajfgcsaz082cv5h3g8dt.
The malicious payload also sets process.title to 'systemd: [logrotate]' to disguise the Node process in system monitoring tools (ps/top output) and includes helper stubs labeled 'Process Hiding & Persistence' and 'Polymorphic & Encryption Layers'. The declared parser purpose is a cover story; the actual behavior on module load is theft of installer-owned wallet key material and direct movement of funds to attacker addresses.
Indicators of compromise
- Packages
- @js-lib-team/env-parser
- Hashes
- ae761b7dd660e94dd99388dedf8c2227fa6a683e314468e7a482cd649c2e1a47
Remediation
- Immediately uninstall @js-lib-team/env-parser from all systems and projects
- Audit npm install logs and package-lock.json to identify all systems where this package was installed
- Rotate all private keys, secrets, and mnemonics that may have been exposed or stored in local.env files
- Monitor all blockchain wallets for unauthorized transactions and fund transfers
- Review transaction history on Ethereum, Binance Smart Chain, Polygon, Avalanche, and other supported chains for suspicious activity
- If funds were transferred, report the incident to relevant blockchain security teams and law enforcement
- Implement package pinning and integrity verification in dependency management
- Use npm audit and supply chain security tools to detect similar malicious packages
Sources
- GitHub Advisory GHSA-pqxh-h974-337x · GitHub Advisory Database
Cite this entry
"Malicious code in @js-lib-team/env-parser (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 21, 2026; last updated August 21, 2026. https://supplychainattack.org/incident/malicious-code-in-js-lib-team-env-parser-npm-1noasi
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malware in svelte-dim-kit
The npm package svelte-dim-kit was found to contain malware, potentially giving attackers full control of affected systems. All systems with this package installed should be considered compromised and secrets/keys rotated immediately from a different computer.
npmCompromised package - containedcritical
Malicious code in @syncraft-labs/react (npm)
The npm package @syncraft-labs/react contained obfuscated malicious code in its ESM distribution that implements the EtherHiding pattern, fetching and executing arbitrary code from an Ethereum smart contract via RPC endpoints. The tampering occurred post-build in the dist/index.js artifact.
npmCompromised package - containedcritical
Malicious code in stillm4ddpocs-demo-sprocket (npm)
The npm package stillm4ddpocs-demo-sprocket version 999.9.12 contains malicious code that exfiltrates system and project metadata via multiple channels (HTTPS, HTTP, and DNS) to a hardcoded callback host. The package uses a high version number to exploit dependency-confusion attacks against organizations with internal packages of the same name.
npmCompromised packageDependency confusion - resolvedcritical
Malicious code in stillm4ddpocs-rtest-bravo (npm)
The npm package stillm4ddpocs-rtest-bravo contained malicious code in its preinstall script that automatically executed during installation, collecting system information and internal package metadata and exfiltrating it to a third-party Interactsh collector via HTTPS and DNS tunneling.
npmCompromised package