Regular Expression Denial of Service in braces
Summary
GHSA-g95f-p29q-9xw4: Regular Expression Denial of Service in braces. Affects braces versions < 2.3.1. Fixed in 2.3.1. How to fix ↓
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 'braces' package is an npm package used for expanding and generating lists of strings using brace expansion. It provides a simple and efficient way to generate combinations of strings based on a given pattern. The package is widely used in JavaScript applications for tasks such as file globbing, command-line argument expansion, and more. However, versions prior to 2.3.1 are vulnerable to Regular Expression Denial of Service (ReDoS).
Vulnerability Detail
Regular Expression Denial of Service (ReDoS) is a type of vulnerability that occurs when a regular expression pattern is susceptible to catastrophic backtracking. In the case of the 'braces' package, untrusted input can cause the regular expression matching to enter an exponential time complexity, leading to a denial of service. An attacker could exploit this vulnerability by providing specially crafted input that triggers the catastrophic backtracking, causing the application to become unresponsive. The impact of this vulnerability is a potential denial of service, rendering the affected application unavailable.
How To Fix
Latest published version: 3.0.3 as of 22 Oct 2026
npm install braces@3.0.3
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.3.1
This is the first release that contains the fix.
npm install braces@2.3.1
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The 'braces' package prior to version 2.3.1 is vulnerable to Regular Expression Denial of Service (ReDoS), which can lead to a denial of service. It is crucial to upgrade to version 2.3.1 or higher to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for braces →
FAQ
The 'braces' package is used for expanding and generating lists of strings using brace expansion. It is commonly used in JavaScript applications for tasks such as file globbing and command-line argument expansion.
Regular Expression Denial of Service (ReDoS) is a vulnerability that occurs when a regular expression pattern is susceptible to catastrophic backtracking. It can lead to a denial of service by causing the application to become unresponsive.
The impact of this vulnerability is a potential denial of service, rendering the affected application unavailable.
To fix this vulnerability, you should upgrade to version 2.3.1 or higher of the 'braces' package.
No, upgrading to the fixed version is the recommended solution for this vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for braces.