CVE-2021-23364: Regular Expression Denial of Service in browserslist

browserslist Updated 02 Oct 2025

Summary

24/05/2021
Yes i
Moderate
5.3

CVE-2021-23364: Regular Expression Denial of Service in browserslist. Affects browserslist versions >= 4.0.0, < 4.16.5. Fixed in 4.16.5. How to fix ↓

Also tracked for

The same CVE-2021-23364 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The package browserslist is an npm package that provides a way to share target browsers and Node.js versions between different front-end tools. It is commonly used in web development projects to ensure compatibility across different browsers. The package allows developers to define a list of supported browsers and Node.js versions using a query-like syntax. This information is then used by various tools to optimize and customize the output for specific environments. However, versions 4.0.0 to 4.16.5 of browserslist are vulnerable to Regular Expression Denial of Service (ReDoS) attacks during the parsing of queries.

Vulnerability Detail

Regular Expression Denial of Service (ReDoS) is a type of vulnerability that can cause a denial of service by exploiting the way regular expressions are processed. In the case of browserslist, an attacker can craft a malicious query that triggers a ReDoS attack during the parsing process. This can lead to excessive CPU usage and potentially cause the application to become unresponsive. The vulnerability affects versions 4.0.0 to 4.16.5 of browserslist.

How To Fix

Minimum fixed version

4.16.5

This is the first release that contains the fix.

npm install browserslist@4.16.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to update to the latest version of the browserslist package as soon as possible.

Conclusion

The browserslist package versions 4.0.0 to 4.16.5 are vulnerable to Regular Expression Denial of Service (ReDoS) attacks. To mitigate this vulnerability, it is crucial to update to the latest version of the package (4.16.5 or later). For further assistance and support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for browserslist →

Share this vulnerability

FAQ

browserslist is an npm package used in web development projects to define a list of supported browsers and Node.js versions.

ReDoS is a type of vulnerability that can cause a denial of service by exploiting the way regular expressions are processed.

An attacker can craft a malicious query that triggers a ReDoS attack during the parsing process of browserslist.

The vulnerability can lead to excessive CPU usage and potentially cause the application to become unresponsive.

Update the browserslist package to version 4.16.5 or later by running 'npm install browserslist@latest'.

Related vulnerabilities

Recent vulnerabilities recorded for browserslist.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

4.16.5

This is the first release that contains the fix.

npm install browserslist@4.16.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

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 →
Help improve this record
Report an issue or send feedback