Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in chalk-core (npm)

chalk-core@1.0.0 is a typosquatting package masquerading as the popular chalk library. It contains malicious postinstall scripts that decode and execute arbitrary binaries on Windows and WSL systems, with command-and-control beaconing to 193.70.34.101:20099.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer or system that installed chalk-core@1.0.0 from npm
Ecosystems
Attack vectors
Affected entities
  • chalk-core · 1.0.0

chalk-core@1.0.0 is a typosquatting attack targeting the widely-used chalk npm package. The malicious package exports an empty object and contains no legitimate chalk functionality.

The attack is delivered via a postinstall script (scripts/postinstall.js) that executes automatically on npm install. The script uses XOR encoding (key 'stf2026') to obfuscate a hidden URL and fetches an executable to %TEMP%\main.exe on Windows systems, then launches it with detached process spawning and hidden windows. No hash or signature verification is performed on the downloaded payload.

For systems running under Windows Subsystem for Linux (WSL), the script detects the virtualized environment by inspecting /proc/version, /proc/sys/kernel/osrelease, and WSL environment variables, then executes a XOR-decoded bridge command that reaches from the Linux guest to the Windows host to fetch and execute the same payload.

Before payload delivery, the postinstall script beacons to http://193.70.34.101:20099/vote (an install-tracker and potential kill-switch server) by assembling the IP address from a string-array literal and POSTing the host platform information. Multiple XOR-encoded byte-array constants (ADDON_ENC, BRIDGE_LAUNCHER_ENC, BRIDGE_SCRIPT_PRE_ENC, BRIDGE_SCRIPT_POST_ENC) are used to hide the download URL and shell commands from casual code inspection.

Indicators of compromise

Packages
  • chalk-core@1.0.0
Domains
  • github.com
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-6c9q-9v4j-fvv5 · GitHub Advisory Database

Cite this entry

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

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