Vulnerability Database · npm · Package report

ansi-regex: vulnerability history, versions and safety

ansi-regex is a package in the npm ecosystem. Vulert records 2 vulnerabilities for it across 22 releases, from Sep 2021 to Sep 2025. Each vulnerability names the versions it affects, the fixed version to move to, and a workaround where no fix has been published.

i
2 vulnerabilities recorded C1 H1
i
1 with no fix published

No patched version yet — these are the ones to plan around.

See the unfixed vulnerabilities →
i
0 in the last 12 months

Nothing new recorded in the last year.

See the disclosure history →
i
1 malicious-package vulnerabilities

A published version contained malicious code.

See malicious packages in npm →

Vulert verdict on ansi-regex 6.4.0 i

Updated on 22 Oct 2026

Careful: 6.4.0 was published with malicious code in it, not just a bug. Do not install it.

Package health score 15/100
  • Security Malicious code published
  • Maintenance Sustainable
  • Popularity Widely used
  • Community Quiet

The current release contains malicious code, which caps this score.

What to do: Do not resolve 6.4.0 as-is. Check whether you already run an affected release and pin a version the maintainers have re-published. Check what you run: Vulert alerts you when a safe version is published. Monitor it with Vulert →

  • Current release 6.4.0 — affected i
  • Vulnerabilities on record 2 over 3 years · 0 in the last year i
  • Latest disclosure 08 Sep 2025 i
  • Highest CVSS 7.5 i
  • With no published fix 1 i
  • Malicious packages 1 i
  • Depended on by 203,886 packages i
  • Stars 201 i
  • OpenSSF scorecard 3/10 i
  • Last release this month i
  • Licence MIT i

Version list, release dates, licence and dependants published by the npm registry, refreshed 22 Oct 2026. Licence information is not legal advice.

Concerned about your application's security?

Vulert continues monitoring your dependencies and alerts you when new vulnerabilities are disclosed. No installation and no source-code access required.

01 Versions

Which versions are affected

Every version Vulert tracks for ansi-regex, newest first, with the vulnerabilities recorded against each one. A version showing none has no vulnerability in the Vulert database — open it for the full picture on that release.

i
Version Released Vulert vulnerabilities Licence Fix published Details
6.4.0 27 Sep 2026 C1 malicious MIT No Details →
6.3.0 12 Aug 2026 C1 malicious MIT No Details →
6.2.2 08 Sep 2025 C1 malicious MIT No Details →
6.2.0 17 Aug 2025 C1 malicious MIT No Details →
6.1.0 09 Sep 2024 C1 malicious MIT No Details →
3.0.1 27 Mar 2022 C1 malicious MIT No Details →
4.1.1 12 Mar 2022 C1 malicious MIT No Details →
5.0.1 14 Sep 2021 C1 malicious MIT No Details →
6.0.1 10 Sep 2021 C1 malicious MIT No Details →
6.0.0 16 Apr 2021 C1 H1 malicious MIT No Details →
5.0.0 04 Oct 2019 C1 malicious MIT No Details →
4.1.0 08 Mar 2019 C1 malicious MIT No Details →
4.0.0 18 Sep 2018 C1 malicious MIT No Details →
3.0.0 20 Jun 2017 C1 malicious MIT No Details →
2.1.1 14 Jan 2017 C1 malicious MIT No Details →
2.0.0 30 Jun 2015 C1 malicious MIT No Details →
1.1.1 22 Feb 2015 C1 malicious MIT No Details →
1.1.0 30 Aug 2014 C1 malicious MIT No Details →
1.0.0 13 Aug 2014 C1 malicious MIT No Details →
0.2.1 20 Jun 2014 C1 malicious MIT No Details →
0.2.0 14 Jun 2014 C1 malicious MIT No Details →
0.1.0 03 Jun 2014 C1 malicious MIT No Details →

All 22 versions Vulert tracks for this package. Severity counts are the vulnerabilities recorded against that exact release.

02 Disclosure history

How often vulnerabilities are recorded

  • 2021 1
  • 2025 1

Counted by the year Vulert recorded each vulnerability — the same date the table below shows as disclosed. 0 of the 2 were recorded in the last 12 months.

03 Vulnerabilities

Recorded vulnerabilities for ansi-regex

The 2 most severe of 2 vulnerabilities recorded for this package

Search all 2 in the database →

Vulnerability wrong, a fix missing, or a package we should cover? Report it and we will fix the record. Report Vulnerability Provide Feedback

Updated: 22/Oct/2026 · Vulnerabilities in our DB: 524171

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.

Questions

About ansi-regex

Is ansi-regex safe to use?

Vulert records 2 vulnerabilities for ansi-regex in npm: 1 critical, 1 high, 0 medium and 0 low. 1 of them has no published fix yet, so that is the one to avoid or mitigate. 1 are malicious-package vulnerabilities: the published package itself contained hostile code, not only a bug.

What is ansi-regex's Vulert package health score?

Vulert scores ansi-regex 15/100, which reads as critical. The score weighs the vulnerability record (40), maintenance and release cadence (25), adoption from dependents and stars (20) and community signals such as the OpenSSF scorecard and forks (15). The current release contains malicious code, which caps this score.

Is the latest version of ansi-regex affected?

Yes. 6.4.0, the version you would install today, has 1 known vulnerability, and 1 has no published fix yet. Use an earlier unaffected release, or the workaround each vulnerability lists.

Which version of ansi-regex should I use?

6.4.0 is the version Vulert recommends for the affected releases. The version table above lists every release with the vulnerabilities recorded against it, so you can confirm the range you actually run.

How many vulnerabilities does ansi-regex have?

2 vulnerabilities are recorded for ansi-regex in the npm ecosystem: 1 critical, 1 high, 0 medium and 0 low. The ledger on this page lists the same counts next to the date of the most recent disclosure.

How often are new ansi-regex vulnerabilities disclosed?

0 vulnerabilities were recorded for ansi-regex in the last 12 months, and the oldest entry in this database dates to 20 Sep 2021. Recency matters more than a lifetime total: it shows how actively new issues are being disclosed for the package you are considering.

Which versions of ansi-regex are affected?

Each vulnerability on this page lists the affected version range and the fixed version to move to. Open the vulnerability for the version you actually run — fixes are specific to a release line, not to the package as a whole.

What does a malicious-package vulnerability mean?

It means the published package itself contained hostile code — a backdoor, a credential stealer or similar — rather than only a bug. Registries remove such packages once they are confirmed, so treat any application that resolved an affected version as compromised and rotate the credentials it could reach.

How do I monitor ansi-regex for upcoming vulnerabilities?

Upload the manifest or SBOM for your application at vulert.com/scanner and Vulert keeps checking the ansi-regex version you actually run against new disclosures, then alerts you when one affects it. There is no installation and no source-code access required.