Malicious code in mnemonic-to-key (npm)
The npm package 'mnemonic-to-key' version 1.2.0 contains malicious code that exfiltrates environment variables and system information to a Telegram bot on first import. It acts as a typosquat for the legitimate 'bip39' package, targeting cryptocurrency developers by capturing sensitive data such as API tokens and cloud credentials from process environments. The package sends this data encoded via HTTPS GET requests and suppresses repeated transmissions using a flag file.
AI Analysis
Technical Summary
The 'mnemonic-to-key' npm package version 1.2.0 includes malicious code that, upon being required, serializes the entire process.env along with hostname, username, homedir, platform, and current working directory into a JSON object. This data is base64-encoded and sent via an HTTPS GET request to a Telegram bot endpoint using a hardcoded bot token and chat ID. The package masquerades as a drop-in replacement for the legitimate 'bip39' package, lazily re-exporting the real module if present, or otherwise providing stub functions. This behavior indicates a typosquatting attack aimed at exfiltrating sensitive environment variables commonly found in developer and CI environments, such as API tokens and cloud credentials. A flag file in the OS temporary directory prevents repeated data exfiltration on subsequent imports.
Potential Impact
Sensitive environment variables and system information are exfiltrated to an attacker-controlled Telegram bot on first import of the malicious package. This can lead to credential leakage including API tokens, cloud service credentials, and publish tokens, potentially compromising developer and CI environments. The attack targets cryptocurrency developers by impersonating a commonly used package, increasing the risk of inadvertent installation and data theft.
Mitigation Recommendations
No official patch or fix is currently documented. Users should avoid using the 'mnemonic-to-key' package version 1.2.0 and verify the authenticity of packages before installation, especially those related to cryptocurrency. Remove the malicious package if installed and rotate any potentially exposed credentials. Monitor for typosquatting packages and use trusted package sources. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Malicious code in mnemonic-to-key (npm)
Description
The npm package 'mnemonic-to-key' version 1.2.0 contains malicious code that exfiltrates environment variables and system information to a Telegram bot on first import. It acts as a typosquat for the legitimate 'bip39' package, targeting cryptocurrency developers by capturing sensitive data such as API tokens and cloud credentials from process environments. The package sends this data encoded via HTTPS GET requests and suppresses repeated transmissions using a flag file.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'mnemonic-to-key' npm package version 1.2.0 includes malicious code that, upon being required, serializes the entire process.env along with hostname, username, homedir, platform, and current working directory into a JSON object. This data is base64-encoded and sent via an HTTPS GET request to a Telegram bot endpoint using a hardcoded bot token and chat ID. The package masquerades as a drop-in replacement for the legitimate 'bip39' package, lazily re-exporting the real module if present, or otherwise providing stub functions. This behavior indicates a typosquatting attack aimed at exfiltrating sensitive environment variables commonly found in developer and CI environments, such as API tokens and cloud credentials. A flag file in the OS temporary directory prevents repeated data exfiltration on subsequent imports.
Potential Impact
Sensitive environment variables and system information are exfiltrated to an attacker-controlled Telegram bot on first import of the malicious package. This can lead to credential leakage including API tokens, cloud service credentials, and publish tokens, potentially compromising developer and CI environments. The attack targets cryptocurrency developers by impersonating a commonly used package, increasing the risk of inadvertent installation and data theft.
Defensive Guidance
No official patch or fix is currently documented. Users should avoid using the 'mnemonic-to-key' package version 1.2.0 and verify the authenticity of packages before installation, especially those related to cryptocurrency. Remove the malicious package if installed and rotate any potentially exposed credentials. Monitor for typosquatting packages and use trusted package sources. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13349
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a738520bf8831d5394ef8f6
Added to database: 08/05/2026, 18:46:56 UTC
Last enriched: 08/05/2026, 23:00:49 UTC
Last updated: 09/07/2026, 22:24:16 UTC
Views: 18
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.