MAL-2026-14165Malicious code in chalk-core (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | chalk-core | 1.0.0 |
{"modified":"2026-08-18T23:58:41Z","published":"2026-08-18T23:58:41Z","schema_version":"1.7.4","id":"MAL-2026-14165","summary":"Malicious code in chalk-core (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (fbf1ccbcd9b3ae6643a7948154a981ef7e072afbae6d9611f832df11fccc6707)\nchalk-core@1.0.0 typosquats the popular chalk package but ships no chalk functionality — index.js exports an empty object. Its only behavior is in scripts/postinstall.js, which runs automatically on npm install. The script XOR-decodes (key 'stf2026') a hidden URL that resolves to a github.com download, fetches an executable to %TEMP%\\main.exe on Windows, and launches it detached (spawn with detached:true, stdio:'ignore', windowsHide:true) with no hash or signature verification. When running under WSL, isVirtualizedLinux() inspects /proc/version, /proc/sys/kernel/osrelease, and WSL_DISTRO_NAME / WSLENV, then exec()s a XOR-decoded bridge command that reaches out of the Linux guest to the Windows host to fetch and execute the same payload. Before the drop, postinstall assembles the bare IPv4 193.70.34.101 from a string-array literal ['193','70','34','101'].join('.') and POSTs the host platform to http://193.70.34.101:20099/vote — an install-tracker/kill-switch beacon on a non-standard port. Four separate XOR-encoded byte-array constants (ADDON_ENC, BRIDGE_LAUNCHER_ENC, BRIDGE_SCRIPT_PRE_ENC, BRIDGE_SCRIPT_POST_ENC) hide the download URL and shell commands from casual inspection.\n","affected":[{"package":{"ecosystem":"npm","name":"chalk-core"},"versions":["1.0.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"scripts/postinstall.js","sha256":"dc0dcdefae5ad1faa736b6518c4a47884aa97e5d98ee14dc076026f3c631a561","tlsh":"4ed13fca1ef59034874bf96884cf9d13b2a6c207320d4a65ff8f42107f5793c85a69e9"}],"package_integrity":[{"filename":"chalk-core-1.0.0.tgz","hashes":{"sha1":"781c6685404e8efbad11e019395f3d5fa06feac7","sha512_sri":"sha512-u04tIliLUY/zMyeHmK5iDD3GgBB+9rdkxGA1KXltL1J1x18g4O9ZUHErsn9OwvKdzT8Kq3LJ9X7Cl35tJFKLvw=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chalk-core/v/1.0.0"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-018246","import_time":"2026-08-19T00:21:12.658428669Z","modified_time":"2026-08-18T23:58:41Z","sha256":"fbf1ccbcd9b3ae6643a7948154a981ef7e072afbae6d9611f832df11fccc6707","source":"amazon-inspector","versions":["1.0.0"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0