Malicious code in chalk (npm)
Compromised versions · chalk
- 5.6.1
Safe
Every other versionincluding the latest, 6.0.1
npm install chalk@6.0.1Not affected
6.0.0 – 6.0.1
2 releases, latest
Not affected
5.0.0 – 5.6.0
11 releases
Affected
5.6.1
1 release
Safe
5.6.2
1 release
What happens
If one of these versions was installed
- Treat the machines and CI runners that installed it as compromised.
- Rotate the npm, GitHub and cloud tokens they could reach.
- 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.