Skip to main content
MalwarePublished

chalk-lib (npm) · Malicious Code

Affects chalk-libSource GCVE Database

0

Malicious package : remove chalk-lib and rotate any secrets on hosts that installed it.

Data as of 19 Aug 2026, 14:48 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-14167

What to do

Remove chalk-lib from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmchalk-libAffected
  • =1.0.0
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The chalk-lib npm package is a malicious typosquat of the legitimate chalk package. It contains an empty library body but executes a postinstall script that downloads and runs a Windows executable from a GitHub URL. The script also attempts to extend the attack from WSL or Linux environments to the Windows host via a PowerShell bridge. Additionally, it sends platform information to a hardcoded IP address over plain HTTP. This behavior indicates a supply chain attack through a malicious npm package.

References

Community reviews

Loading reviews…