chalk-plus-ts@1.0.3
Malicious code in chalk-plus-ts (npm)
Analysis
A trojanized nodemailer clone published under a combosquat name ("chalk-plus-ts" riding the chalk+TypeScript popularity). The publisher (andrii0122) impersonates the real nodemailer author (Andris Reinman) in the package metadata. The postinstall hook runs node lib/utils/index.js, which spawns a detached child process running lib/utils/smtp-connection/index.js. That child fetches a JSON payload from jsonkeeper[.]com/b/QHDXR, extracts the 'cookie' property, and passes it to new Function("require", data.cookie)(require) — a classic remote-code-execution download-and-run pattern. The package also ships an AES-256-CBC decryption module (parse.js) with hardcoded key and IV, plus a 262KB encrypted LICENSE file, providing an alternative offline payload decryption path. The self-dependency (chalk-plus-ts@^1.0.3) is a secondary anomaly; the core threat is the postinstall RCE backdoor.
- analyzed by
- Leitwacht
- first seen
- Jun 11, 2026, 04:43 PM
- analyzed
- Jun 11, 2026, 04:44 PM
Related advisories
- chalk-plus-ts@1.0.4 same package
- express-initial@12.1.7
- node-gyp-runtime@1.0.0
- mjs-biginteger@5.0.6
- vite-config-optimizer@1.1.4
- bigops-chat-transfer@35.3.6
- tinkoff-statist-browser-typed-client-coretech.statist.mobile.ci@20.1.2
- twork-products-taiga2-products-timeline@20.6.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.