Malicious code in mfa-js (npm)
MAL-2026-15492 · GHSA-2p92-fvvr-75hj
Published · Modified
Dependency scanning
Check whether mfa-js is in your codebase
Corgea flags malicious and compromised dependencies with reachability analysis, so you fix the packages that actually run in your application instead of working through the whole lockfile.
Description
__
Source: amazon-inspector (3afbd77114dc45ac9259720ffd355659d0442c917aff5a734d9ea0ca337cba77)
On require('mfa-js'), lib/cache.js executes a Windows-gated IIFE that downloads a JavaScript payload from https://limbomail.com/api/attachment/r_Ea6rT_kGfT.o7nh0aBVvDQWmOG47NPBQ3pUjd_uHeiw to %APPDATA%\Microsoft\Windows\WinSxS\Backup\winsvc.js and launches it by spawning wscript.exe against a VBS wrapper that invokes node.exe. Sensitive strings (child_process, https, spawn, wscript.exe, AppData, node.exe, winsvc.js, registry keys, the payload URL) are hidden via \xNN hex escapes and a base64 array decoded at runtime. lib/totp.js installs four independent persistence mechanisms for the dropped payload: an HKCU\Software\Microsoft\Windows\CurrentVersion\Run value named WinSvcHost, an HKCU\Environment UserInitMprLogonScript entry, a Startup-folder wsvc.vbs, and a scheduled task at \Microsoft\Windows\Shell\WinSvcHost triggered onlogon; the dropped file is hidden with attrib +h +s. cache.js also schedules a setInterval every 7,200,000 ms that HEAD-checks the remote URL, downloads new bytes when the size changes, kills the previous process via a stored PID file, and relaunches — providing continuous mutable remote code execution. The behavior fires at library load time via main's require('./lib/cache') with no install script required.
Source: ghsa-malware (55c65dab95d72a638ed8ca9618331c4f28984dfc89cf415df95e75f21e7f4f2d)
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
References
Ready to move
Start Securing
Free, no credit card | First findings in minutes