ansi-regex vulnerabilities

Regular expression for matching ANSI escape codes

Registry
npm
Latest
6.4.0
License
MIT

2 known advisories

The latest version, 6.4.0, is not affected by any of them. Projects on older versions may be. Some versions were published with malicious code: remove them and rotate any secrets the install could read.

Update to the latest version:npm install ansi-regex@6.4.0

Security advisories for ansi-regex

  • CriticalMAL-2025-469668 Sept 2025

    Malicious code in a published version

    Affected
    6.2.1
    Fixed in
    No fix released
  • HighGHSA-93q8-gq69-wqmw20 Sept 2021

    Inefficient Regular Expression Complexity in chalk/ansi-regex

    Affected
    >=6.0.0 <6.0.1 · >=5.0.0 <5.0.1 · >=4.0.0 <4.1.1 · >=3.0.0 <3.0.1
    Fixed in
    3.0.1, 4.1.1, 5.0.1, 6.0.1

Which of your client projects still run an old ansi-regex?

NPMscan reads the package-lock.json, yarn.lock and pnpm-lock.yaml in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other npm packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the npm registry.