All advisories
High

Malicious versions of chalk, debug and other popular npm packages

Attackers compromised several widely used npm packages to steal crypto-wallet data and builders should check their lockfiles for specific malicious versions.

Advisory date8 Sep 2025
SeverityHigh
AffectedMalicious versions of chalk debug and 16 other npm packages
Fixed inMalicious versions removed from the npm registry

What happened

Attackers phished a maintainer to publish malicious versions of several popular libraries including chalk and debug, which contained code designed to hijack browser-side cryptocurrency wallets. The npm registry removed the affected versions within hours of the discovery. Any project that performed an install during that window remains vulnerable.

Who is affected

Any project that updated its dependencies on 8 September 2025 might have installed the compromised code, which includes packages like ansi-styles and supports-color. These libraries are often installed as sub-dependencies without the developer's direct knowledge. Projects using automated dependency updates are particularly at risk.

Why it matters if you build with AI

AI coding tools often suggest or automatically install the latest versions of dependencies without manual review, so your application could be serving malicious code if your agent updated your environment during the window of compromise. This type of supply-chain attack bypasses traditional perimeter security. Verifying lockfiles ensures your automated builds remain secure.

What to do

  • Check your lockfile for chalk 5.6.1 or debug 4.4.2
  • Pin dependencies to the last known clean versions
  • Clear build caches and rebuild your application
  • Use frozen lockfiles in your continuous integration pipeline

Locaas is being built to track advisories like this, check your running applications and propose the necessary updates for your approval.

Get early access

Sources

More advisories