<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Brace-Expansion (&lt;= 5.0.7) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/brace-expansion--5.0.7/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 24 Jul 2026 22:02:52 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/brace-expansion--5.0.7/feed.xml" rel="self" type="application/rss+xml"/><item><title>Denial of Service via Unbounded Expansion Length in Node.js brace-expansion Library (CVE-2026-14257)</title><link>https://feed.craftedsignal.io/briefs/2026-07-brace-expansion-dos/</link><pubDate>Fri, 24 Jul 2026 22:02:52 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-brace-expansion-dos/</guid><description>An attacker can exploit CVE-2026-14257, a denial of service vulnerability in the `brace-expansion` Node.js library, by crafting an input with deeply chained brace groups that causes the expanded string length to grow without bound, leading to an uncatchable out-of-memory process crash in any application processing untrusted input via `expand()` directly or through dependencies like `minimatch` or `glob`.</description><content:encoded><![CDATA[<p>A high-severity denial of service (DoS) vulnerability, tracked as CVE-2026-14257, exists in the Node.js <code>brace-expansion</code> library, affecting versions up to and including 5.0.7. The library's <code>expand()</code> function, which is used for generating string expansions from brace patterns, fails to properly bound the total length of the expanded strings despite having a limit on the number of results. Attackers can leverage this by crafting input with many chained brace groups, such as <code>'{a,b}'.repeat(N)</code>. This input causes each individual expanded result to grow in length with the number of groups, leading to excessive memory consumption. When processing even a relatively small input (~7.5 KB with <code>'{a,b}'.repeat(1500)</code>), the Node.js process exhausts its memory and crashes due to an uncatchable fatal out-of-memory error, resulting in a denial of service for the application. Applications directly using <code>brace-expansion</code> or indirectly through common dependencies like <code>minimatch</code> or <code>glob</code> are at risk.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious input string containing numerous chained brace groups (e.g., <code>'{a,b}'.repeat(1500)</code>).</li>
<li>The attacker delivers this crafted input to a vulnerable application that processes user-supplied strings.</li>
<li>The vulnerable application passes the crafted input string to the <code>brace-expansion.expand()</code> function, either directly or via a transitive dependency like <code>minimatch</code> or <code>glob</code>.</li>
<li>The <code>expand()</code> function begins processing the input, attempting to generate all possible expansions.</li>
<li>During expansion, <code>brace-expansion</code> generates intermediate and final string results where the individual string length grows linearly with the number of brace groups.</li>
<li>The <code>brace-expansion</code> process allocates and holds an increasing amount of memory for these growing strings and intermediate arrays.</li>
<li>The Node.js V8 engine exhausts its available heap memory as the total output size (<code>max</code> results * <code>N</code> character length) grows without bound.</li>
<li>The Node.js process terminates abruptly due to a fatal, uncatchable out-of-memory error, leading to a complete denial of service for the affected application.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability allows an attacker to cause a fatal denial of service for any Node.js application that processes untrusted or attacker-controlled strings through <code>brace-expansion.expand()</code>, either directly or indirectly via popular libraries such as <code>minimatch</code> or <code>glob</code>. The issue is critical because the out-of-memory error is uncatchable, meaning <code>try/catch</code> blocks around the <code>expand()</code> call will not prevent the process from crashing entirely. Even a small payload of approximately 7.5 KB is sufficient to crash a default Node.js process, leading to severe availability impacts for affected services. The vulnerability impacts application stability and reliability.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>brace-expansion</code> package to a patched release (version 5.0.8 or later) to remediate CVE-2026-14257.</li>
<li>If immediate upgrade is not feasible, avoid passing untrusted input directly to <code>brace-expansion.expand()</code> or to components that use it (e.g., <code>minimatch</code>, <code>glob</code>).</li>
<li>For applications that must process untrusted input, explicitly configure a small <code>max</code> and the new <code>maxLength</code> option when using <code>brace-expansion</code> to limit both the number and total length of expansions.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>denial-of-service</category><category>vulnerability</category><category>node.js</category><category>software-supply-chain</category></item></channel></rss>