Malicious code in totp-utils (npm)
The npm package totp-utils contains malicious code that executes both at install time and when its validateSecret API is called. It stealthily scans local Discord and Minecraft credential stores, decrypts sensitive tokens, validates Discord tokens, and exfiltrates these credentials to a hardcoded Discord webhook. Additionally, it drops a malicious JAR file into Minecraft mods directories, which executes unverified code when Minecraft is launched with Fabric loader. This behavior extends the attack surface beyond installation to runtime usage of the package.
AI Analysis
Technical Summary
The totp-utils npm package versions 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, and 1.4.9 include a postinstall script and a validateSecret API that invoke a hidden _run() routine. This routine scans LevelDB stores for Discord authentication tokens, decrypts them using Windows DPAPI via PowerShell, parses Minecraft launcher credentials from multiple sources, validates Discord tokens against the Discord API, and exfiltrates harvested credentials to a hardcoded Discord webhook URL reconstructed at runtime. It also enumerates Minecraft mods directories and writes a malicious JAR file named optimized-renderer-1.0.0.jar from a Discord CDN URL into each mods folder, which executes when Minecraft is launched with Fabric loader. The postinstall script suppresses errors and delays completion to avoid detection. The malicious code activates both during installation and whenever the validateSecret function is called, increasing the risk of credential theft and remote code execution.
Potential Impact
This malicious package compromises user security by stealing sensitive Discord authentication tokens and Minecraft credentials, potentially allowing attackers to hijack user accounts. The dropped malicious JAR file enables execution of unverified code within the Minecraft environment, posing a risk of remote code execution on the victim's system. The stealthy nature of the postinstall script and runtime activation of the malicious routine increase the likelihood of unnoticed compromise.
Mitigation Recommendations
No official patch or remediation guidance is provided in the available data. Users should immediately remove all affected versions of the totp-utils package (=1.4.2, =1.4.3, =1.4.4, =1.4.5, =1.4.6, =1.4.7, =1.4.8, =1.4.9) from their environments. Avoid using this package and audit systems for the presence of the malicious optimized-renderer-1.0.0.jar file in Minecraft mods directories. Rotate any potentially compromised Discord and Minecraft credentials. Monitor for suspicious activity related to these accounts. Check vendor advisories or npm security advisories for updates or official fixes.
Malicious code in totp-utils (npm)
Description
The npm package totp-utils contains malicious code that executes both at install time and when its validateSecret API is called. It stealthily scans local Discord and Minecraft credential stores, decrypts sensitive tokens, validates Discord tokens, and exfiltrates these credentials to a hardcoded Discord webhook. Additionally, it drops a malicious JAR file into Minecraft mods directories, which executes unverified code when Minecraft is launched with Fabric loader. This behavior extends the attack surface beyond installation to runtime usage of the package.
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 totp-utils npm package versions 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, and 1.4.9 include a postinstall script and a validateSecret API that invoke a hidden _run() routine. This routine scans LevelDB stores for Discord authentication tokens, decrypts them using Windows DPAPI via PowerShell, parses Minecraft launcher credentials from multiple sources, validates Discord tokens against the Discord API, and exfiltrates harvested credentials to a hardcoded Discord webhook URL reconstructed at runtime. It also enumerates Minecraft mods directories and writes a malicious JAR file named optimized-renderer-1.0.0.jar from a Discord CDN URL into each mods folder, which executes when Minecraft is launched with Fabric loader. The postinstall script suppresses errors and delays completion to avoid detection. The malicious code activates both during installation and whenever the validateSecret function is called, increasing the risk of credential theft and remote code execution.
Potential Impact
This malicious package compromises user security by stealing sensitive Discord authentication tokens and Minecraft credentials, potentially allowing attackers to hijack user accounts. The dropped malicious JAR file enables execution of unverified code within the Minecraft environment, posing a risk of remote code execution on the victim's system. The stealthy nature of the postinstall script and runtime activation of the malicious routine increase the likelihood of unnoticed compromise.
Mitigation Recommendations
No official patch or remediation guidance is provided in the available data. Users should immediately remove all affected versions of the totp-utils package (=1.4.2, =1.4.3, =1.4.4, =1.4.5, =1.4.6, =1.4.7, =1.4.8, =1.4.9) from their environments. Avoid using this package and audit systems for the presence of the malicious optimized-renderer-1.0.0.jar file in Minecraft mods directories. Rotate any potentially compromised Discord and Minecraft credentials. Monitor for suspicious activity related to these accounts. Check vendor advisories or npm security advisories for updates or official fixes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-14379
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a8af9a3acd9273b49f32ecf
Added to database: 08/23/2026, 13:46:11 UTC
Last enriched: 08/23/2026, 13:48:41 UTC
Last updated: 08/23/2026, 15:02:00 UTC
Views: 4
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.
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.