Is ansi-regex 4.0 vulnerable?
npm · 1 release from 4.0.0 to 4.0.0 · latest ansi-regex is 6.5.0 · checked 2 Nov 2026
Yes: 1 known advisory
Yes. ansi-regex 4.0.0, the last 4.0 release, is affected by 1 known security advisory (1 high), including CVE-2021-3807. Upgrade to 4.1.1 or later to fix all of them.
Upgrade with:
npm install ansi-regex@4.1.1Advisories affecting ansi-regex 4.0.0
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 are still on ansi-regex 4.0?
NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact ansi-regex version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.
Other ansi-regex versions
Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the npm registry. Refreshed daily.