mham-jsnpm
Advisory published Updated
mham-js is a confirmed malicious npm package (MAL-2026-14478) that executes malicious code on install (malicious version 1.0.4). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in mham-js (npm)
What this malware does
On import of mham-js, src/api/session-api.js runs top-level code that reads a file outside the package tree at../../../../public/logo.ico, decrypts its contents with CryptoJS.DES using the hardcoded password 'bf497c0b9cee', then spawns a detached node subprocess and pipes the decrypted bytes to its stdin for execution. The loader is disguised with cover-story names ('readLogoIco', 'rsa_exec', 'ThetaSDK initialization error'), and the README states the package does nothing on import, contradicting the actual behavior. The executed payload is stored encrypted outside the tarball, is not verified or documented, and consists of opaque attacker-controlled bytes handed directly to the Node interpreter as arbitrary code.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Search your lockfiles and build artifacts for mham-js (version 1.0.4).
If you installed it — respond
Remove mham-js from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If mham-js was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks mham-js-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.