utils-mfnpm
Malicious code in utils-mf (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
Package metadata advertises 'utility mf' with main 'index.js', but the shipped main is a 15.7MB obfuscator.io-style blob preceded by ~8MB of invisible-Unicode whitespace padding designed to conceal its contents. On require(), the module performs several unsafe and attacker-beneficial actions:
-
Hidden WhatsApp bot payload: index.js dynamically imports
@whiskeysockets/baileys, callsuseMultiFileAuthState('sessions/dev'), opens a WhatsApp socket viamakeWASocket(...), prompts on stdin for a pairing-code phone number, and writes credential state to./sessions/. None of this is gated behind an exported function — it fires when the module is loaded. -
Auto-exfiltration of accumulated chat/session state: an
AutoBackuproutine on a 30-secondsetIntervalPUTs the localdatabase.json(containing chats, contacts, sessions, and env-derived state) tohttps://api.github.com/repos/<owner>/<repo>/contents/database.jsonand the analogous GitLab API, using a token and repo path read from package-operator settings. The destination repo and credential are not the library consumer's — they are configured in the package's payload, so any consumer running this code uploads their accumulated state to the package operator's repository on a timer. -
Runtime self-updater / silent-mutation primitive: on load, the module fetches
https://registry.npmjs.org/utils-mf/latest, compares versions, downloads the latest tarball to./tmp/upgrade.tgz, and extracts it overnode_modules/utils-mf/usingtar -xzf(orExpand-Archiveon Windows), then reloads. Already-installed copies will silently pull and execute any future published version, including a compromised one — the package mutates itself at runtime regardless of the consumer's lockfile. -
Privileged system mutation at import: the top-level code shells out via
exectoapt-get install -y ffmpeg imagemagick git tar zip unzipwhen those binaries are missing, runs recurringexec('rm -rf /tmp/*')andexec('netstat -an')on intervals, and writes to./tmp/and./sessions/in the consumer's CWD.
The combination of deceptive packaging (utility name, opaque blob), import-time exfiltration of local data to attacker-configured repos, an in-band self-update channel that bypasses normal dependency pinning, and unsanctioned privileged shell execution constitutes an active supply-chain attack against any installer who consumes this package as a 'utility'.
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.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for utils-mf (10 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging utils-mf across your stack and pipelines.
If you installed it — respond
utils-mf is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If utils-mf was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks utils-mf before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks utils-mf-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.