Packages / chalk / Security

Malicious packageMAL-2025-46969GHSA-2v46-p5h4-248wPublished 8 Sep 2025

Malicious code in chalk (npm)

Your version

Compromised versions · chalk

  • 5.6.1

Safe

Every other versionincluding the latest, 6.0.1

npm install chalk@6.0.1
6.x
  1. Not affected

    6.0.0 – 6.0.1

    2 releases, latest

5.x
  1. Not affected

    5.0.0 – 5.6.0

    11 releases

  2. Affected

    5.6.1

    1 release

  3. Safe

    5.6.2

    1 release

44 stable releases of chalk, oldest to newest, one row per major.

What happens

If one of these versions was installed

  1. Treat the machines and CI runners that installed it as compromised.
  2. Rotate the npm, GitHub and cloud tokens they could reach.
  3. Reinstall from a lockfile that pins a version outside the list.

The package was compromised and malicious code added.


-= Per source details. Do not edit below this line.=-

Source: ghsa-malware (985b6546ed08c8482326a4819faec318c27c1f6d7518acdf384d5f5a8c1453aa)

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.