MAL-2026-14170Malicious code in comander-cli (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | comander-cli | 1.0.0 |
{"modified":"2026-08-18T23:56:29Z","published":"2026-08-18T23:56:29Z","schema_version":"1.7.4","id":"MAL-2026-14170","summary":"Malicious code in comander-cli (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (8296169da90107eec2a24127137eacf4a47dfca0c780111705aa542c3159d626)\ncomander-cli is a typosquat of the popular 'commander' package whose index.js exports an empty object, providing no advertised functionality. All behavior is in scripts/postinstall.js, which runs automatically on npm install. The script XOR-decodes obfuscated byte arrays with the hardcoded key 'stf2026' to reconstruct a remote download URL and Windows shell/powershell bridge commands, fetches a Windows executable, writes it to %TEMP%\\main.exe, and launches it detached with stdio ignored and windowsHide. On Linux hosts running under WSL (detected via WSL_DISTRO_NAME, WSLENV, and /proc/version containing 'microsoft'), the script assembles an obfuscated bridge command and passes it to child_process.exec to install and execute the payload on the underlying Windows host, escaping the WSL boundary. The postinstall also POSTs a JSON install beacon over plain HTTP to the hardcoded bare IP 193.70.34.101:20099/vote, with the host reconstructed from a split string array (['193','70','34','101'].join('.')) to evade literal-IP pattern matching. Obfuscated URLs, split-array IP construction, empty library surface, typosquat naming, and install-time detached execution of an attacker-supplied binary are all present.\n","affected":[{"package":{"ecosystem":"npm","name":"comander-cli"},"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":"6edbc90bf0862e576f4bbff7f5d8fa0c0ad65698a9d3485074dc6bc7b946d57d","tlsh":"c2d13fca1ef59035874bf96884cf9d13b2a6c207320e4a65ff8f42107f5793c85a69e9"},{"path":"index.js","sha256":"ac13991093efce1485ecbfa7fa9fa75895e04161fd015d3699fbd07179e829ec"}],"package_integrity":[{"filename":"comander-cli-1.0.0.tgz","hashes":{"sha1":"9afbcb3faa5a097d61b6b16d31e461e7d2148f0a","sha512_sri":"sha512-l952YIX3KETaXi0d3d+eKNkzAHNOGj/YqBfqgvb8Cb8GTzt2qBLgAZfGBmTrl0wuaALfj7pUQno9yUZwStU+CA=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/comander-cli/v/1.0.0"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-018232","import_time":"2026-08-19T00:21:11.322661059Z","modified_time":"2026-08-18T23:56:29Z","sha256":"8296169da90107eec2a24127137eacf4a47dfca0c780111705aa542c3159d626","source":"amazon-inspector","versions":["1.0.0"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0