Version 6.2.1 of ansi-regex was compromised; other versions are not flagged as malicious. CyberXYZ Proxy blocks the affected versions. It also has 1 known vulnerability, the worst rated HIGH.
The package was compromised and malicious code added.
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.
Reported by GitHub Advisory Database via OSV.
// versions and what to do
Malicious
6.2.1
Move to
6.6.0 newest 6.x release, no known advisory
If one of these versions was installed, remove it and treat the credentials, tokens and SSH keys on that machine as exposed: rotate them. Check CI runners and container images that installed it too.
Version 6.2.1 of ansi-regex was compromised. Other versions are not flagged as malicious.
Does ansi-regex have known vulnerabilities?
Yes. CyberXYZ records 1 known vulnerability for ansi-regex (npm), the worst rated HIGH. They are GHSA-93q8-gq69-wqmw.
Which version of ansi-regex should I use?
Use 6.6.0 or a later release that is not named as malicious. Versions named on this report as malicious must not be installed.
How do I check ansi-regex before installing?
Search ansi-regex in CyberXYZ Check at https://cyberxyz.io/check?q=ansi-regex. The xyz Scanner checks a project's dependencies, and CyberXYZ Proxy checks each package as it is installed.
Checked 2026-11-14 at 12:04 UTC. The most recent advisory here was published 2021-09-20. Updated continuously from NVD, GHSA, OSV and CNA feeds.