Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in comander-cli (npm)

comander-cli is a typosquat package on npm containing malicious code in its postinstall script that downloads and executes a Windows executable. The script also attempts to escape WSL boundaries on Linux hosts and beacons to a remote IP address.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer or system that installed comander-cli from npm
Ecosystems
Attack vectors
Affected entities
  • comander-cliTyposquat of 'commander' package

comander-cli is a typosquat of the popular 'commander' npm package designed to deceive developers into installing it instead of the legitimate library. The package exports an empty object, providing no advertised functionality.

All malicious behavior is contained in scripts/postinstall.js, which executes automatically during npm install. The script XOR-decodes obfuscated byte arrays using the hardcoded key 'stf2026' to reconstruct a remote download URL and Windows shell/powershell commands. It then fetches a Windows executable, writes it to %TEMP%\main.exe, and launches it with detached stdio and hidden window.

On Linux hosts running under WSL, the script detects the environment via WSL_DISTRO_NAME, WSLENV, and /proc/version checks, then assembles an obfuscated bridge command to install and execute the payload on the underlying Windows host, escaping the WSL boundary. Additionally, the postinstall script POSTs a JSON install beacon over plain HTTP to 193.70.34.101:20099/vote, with the IP address reconstructed from a split string array to evade pattern matching.

The attack combines multiple evasion techniques: obfuscated URLs, split-array IP construction, empty library surface, typosquat naming, and install-time execution of attacker-supplied binaries.

Indicators of compromise

Packages
  • comander-cli
IPs
  • 193.70.34.101

Remediation

  • Review the linked advisory; remove or upgrade the affected component and rotate any exposed credentials.

Sources

  1. GitHub Advisory GHSA-xwm2-5359-hq95 · GitHub Advisory Database

Cite this entry

"Malicious code in comander-cli (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-comander-cli-npm-sc1vhq

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. resolvedcritical

    Malicious code in create-coin (npm)

    create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.

    npmCompromised packageTyposquatting
  2. containedcritical

    Malicious code in chai-as-testkit (npm)

    The npm package chai-as-testkit is a typosquat/impersonation attack delivering obfuscated malicious code that executes on import. The package falsely claims to be a vulnerability management tool but ships pino library files under a different author, with a synthetic stub that loads a 4MB+ obfuscated bundle containing attacker-controlled code.

    npmTyposquattingCompromised package
  3. resolvedcritical

    Malicious code in @next-fonts/font (npm)

    @next-fonts/font is a typosquat package on npm that executes arbitrary attacker-controlled code via a blockchain-mediated C2 channel when its Inter() function is called. The malicious payload is base64-encoded and executed through Node.js spawn or eval, with no legitimate font functionality.

    npmTyposquattingCompromised package
  4. resolvedcritical

    Malicious code in chai-as-soul (npm)

    chai-as-soul@2.3.5 is a typosquat of the pino logging library containing malicious code that exfiltrates environment variables (including AWS/GCP/CI tokens) and executes arbitrary remote code on installation.

    npmTyposquattingCompromised package