CVE-2021-23364: Regular Expression Denial of Service in browserslist
Summary
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
- node-browserslist · Debian:11
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.
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.
No signup required · Results in about 60 seconds
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 →
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'.
References
Related vulnerabilities
Recent vulnerabilities recorded for browserslist.