Skip to main content

Malicious code in mfa-js (npm)

0
Critical
Published: 08/28/2026 (08/28/2026, 18:19:27 UTC)
Source: GCVE Database
Product: mfa-js

Description

The mfa-js npm package versions 1.0.3 and 1.0.4 contain malicious code that downloads and executes a remote JavaScript payload on Windows systems. This payload is persistently installed using multiple mechanisms including registry run keys, environment variables, startup folder scripts, and scheduled tasks. The malicious code continuously updates itself by checking a remote URL and relaunching the payload, enabling ongoing remote code execution. Any system with this package installed or running should be considered fully compromised.

Affected software

npmghsa
mfa-js
Affected versions
=1.0.4=1.0.3

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

AILast updated: 09/09/2026, 20:53:47 UTC

Technical Analysis

The mfa-js package (versions 1.0.3 and 1.0.4) includes a malicious module (lib/cache.js) that executes immediately upon requiring the package. It downloads a JavaScript payload from a remote URL to a hidden location in the Windows AppData directory and executes it via wscript.exe and a VBS wrapper that invokes node.exe. The package installs four persistence mechanisms to ensure the payload runs on system logon: a registry Run key, an environment variable UserInitMprLogonScript, a startup folder VBS script, and a scheduled task. The malicious code periodically checks the remote payload URL for updates, downloads new code if available, kills the previous process, and relaunches the updated payload, enabling continuous mutable remote code execution. Sensitive strings and URLs are obfuscated via hex escapes and base64 encoding. This behavior occurs without any install script, triggered simply by requiring the package.

Potential Impact

Systems with this package installed are fully compromised, allowing an attacker persistent remote code execution and control. All secrets and keys stored on the compromised system are at risk and should be rotated immediately from a secure environment. Removing the package alone does not guarantee removal of the malicious payload or persistence mechanisms, as full system compromise is likely.

Defensive Guidance

Immediate removal of the mfa-js package versions 1.0.3 and 1.0.4 is required. All credentials and secrets stored on affected systems should be rotated from a different, trusted machine. Due to multiple persistence mechanisms and full system compromise, a thorough forensic investigation and system rebuild or wipe is recommended to ensure complete removal of the malware. No official patch or fix is available; remediation relies on removal and recovery procedures.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-15492
Osv Schema Version
1.7.4
Aliases
["GHSA-2p92-fvvr-75hj"]
Ecosystems
["npm"]

Threat ID: 6a92f7e3acd9273b49e75cc7

Added to database: 08/29/2026, 15:16:51 UTC

Last enriched: 09/09/2026, 20:53:47 UTC

Last updated: 10/01/2026, 22:27:16 UTC

Views: 25

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses