encrypt-string-safe@2.2.0
Malicious code in encrypt-string-safe (npm)
Analysis
encrypt-string-safe is a trojanized npm package that poses as a client-side encryption utility. When imported, it fetches a remote JavaScript payload from an obfuscated URL and executes it via new Function(), enabling the attacker to run arbitrary code on the importing system. The package has no lifecycle hooks — the payload runs on module import. The README describes encryption features that are not implemented; the actual code is a remote-code-execution dropper. The C2 host is encoded in the obfuscated string array at index 0x85 of the a0_0x6555() function in package/index.js.
- analyzed by
- Leitwacht
- first seen
- Jul 26, 2026, 11:39 AM
- analyzed
- Jul 26, 2026, 11:42 AM
Related advisories
- encrypt-string-safe@2.1.0 same package
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.