Malicious code in discord-mfa (npm)
Description
The discord-mfa npm package versions 3.0.0 and 3.0.1 contain malicious code that, when required on Windows systems, downloads and executes a hidden JavaScript payload. This payload is persistently installed through multiple mechanisms to ensure execution on every user logon. The package falsely advertises MFA functionality but contains no legitimate MFA features.
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 discord-mfa npm package (versions 3.0.0 and 3.0.1) includes malicious code that triggers on Windows platforms. Upon requiring the package, index.js loads lib/cache.js, which downloads a JavaScript payload from a remote URL to the user's %APPDATA% directory. The payload is executed via node.exe launched through a hidden wscript.exe/VBS shim. Persistence is established through four independent methods: a registry Run key, a UserInitMprLogonScript environment variable, a hidden VBS script in the Startup folder, and a scheduled task. The package uses hex/base64 obfuscation for module names, API calls, file names, environment variables, registry keys, and the download URL. Despite its name suggesting Discord multi-factor authentication support, it provides no such functionality and instead acts as malware.
Potential Impact
The malicious package results in unauthorized code execution on Windows systems, enabling persistent execution of a potentially harmful JavaScript payload. This can lead to system compromise, unauthorized access, or further malicious activity. The persistence mechanisms ensure the payload runs on every user logon, increasing the risk of prolonged infection.
Mitigation Recommendations
Users should immediately uninstall the discord-mfa package versions 3.0.0 and 3.0.1. Since no official patch or remediation is indicated, avoid using this package entirely. Remove any artifacts left by the malware, including the downloaded winsvc.js file, the registry Run key, the UserInitMprLogonScript environment variable, the hidden wsvc.vbs script in the Startup folder, and the scheduled task named WinSvcHost. Conduct a thorough system scan for additional compromise. Monitor for any suspicious activity related to node.exe or wscript.exe processes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-15552
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a92f7d9acd9273b49e75a80
Added to database: 08/29/2026, 15:16:41 UTC
Last enriched: 09/09/2026, 21:37:56 UTC
Last updated: 10/03/2026, 10:39:32 UTC
Views: 35
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.