Regular Expression Denial of Service in braces

braces Updated 02 Oct 2025

Summary

06/06/2019
LOW
Yes i
Low
3.7

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 ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for braces.

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 →

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