mham-js@1.0.4
Malicious code in mham-js (npm)
Analysis
mham-js@1.0.4 executes a second-stage payload at import time. Importing the package's main entry triggers code in src/api/session-api.js that reads a bundled file (public/logo.ico), decrypts it with a hardcoded DES key (password 'bf497c0b9cee'), and spawns a detached background 'node' process to which the decrypted content is piped via stdin and executed. The package's README states it runs nothing on import, which is false. The bundled encrypted payload file is not shipped in this version, so the loader fails at runtime, but the decrypt-and-execute loader structure is present in the source.
- analyzed by
- Leitwacht
- first seen
- Aug 24, 2026, 05:48 PM
- analyzed
- Aug 24, 2026, 05:50 PM
Related advisories
- dims-hydration-ui@1.0.0
- js-soul@1.0.4
- moidevy@1.0.0
- @pablo_clueless/sniffr@0.1.1
- mc-provider@1.0.10
- @wizloft/harness-plugin-repository-files@0.1.1-alpha.3
- typecript-cli@1.0.0
- ranux-cloud@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.