{"id":"CVE-2026-102277","published":"2026-09-28T20:54:46Z","modified":"2026-09-29T19:38:56Z","title":"brace-expansion: Quadratic-time expansion of the `{a},b}` rewrite causes CPU denial of service","vendor":"juliangruber","product":"brace-expansion","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00524,"percentile":0.37781,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"},{"id":"CWE-407","name":"Inefficient Algorithmic Complexity"}],"references":[{"url":"https://github.com/juliangruber/brace-expansion/security/advisories/GHSA-q2hr-2g5m-vwhr","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/juliangruber/brace-expansion/commit/33a5ef17b8d800bbfa8c52b14c39043b6aac1a96","tags":["x_refsource_MISC"]},{"url":"https://github.com/juliangruber/brace-expansion/commit/bdff773f98e5988616b7039cc9b508df5d640b22","tags":["x_refsource_MISC"]},{"url":"https://github.com/juliangruber/brace-expansion/commit/c55e67d8d8b1c56a2474afff15c2891166b2d364","tags":["x_refsource_MISC"]},{"url":"https://github.com/juliangruber/brace-expansion/commit/ffdfa3e3806bed17c0874b8f1439b084de354a7e","tags":["x_refsource_MISC"]}],"priority":{"score":11.3,"factors":[{"name":"EPSS percentile","points":7.56},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"juliangruber","affectedVersions":[{"vendor":"juliangruber","product":"brace-expansion","versions":[">= 4.0.0, < 5.0.12",">= 3.0.0, < 3.0.9",">= 2.0.0, < 2.1.7","< 1.1.21"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-09-29T19:38:46.678388Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"brace-expansion","vulnerableRanges":[">=4.0.0, <5.0.12",">=3.0.0, <3.0.9",">=2.0.0, <2.1.7","<1.1.21"],"patched":["5.0.12","3.0.9","2.1.7","1.1.21"],"from":["GHSA-q2hr-2g5m-vwhr"],"provenance":"source"}],"summary":{"text":"The brace-expansion JavaScript library, used to generate strings from patterns with a common prefix and suffix, contains a flaw in its expand function that mishandles patterns containing many trailing closing braces. An attacker who can supply a crafted pattern of that shape to an application using the library can trigger quadratic CPU and memory consumption over the network without authentication, user interaction, or any special configuration, which can block the Node.js event loop until processing completes.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:59:51Z"},"euvd":{"id":"EUVD-2026-88551","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-juliangruber-brace-expansion-cve-2026-45149","parents":[{"from":"CVE-2026-102278","to":"CVE-2026-102277","relation":"successor","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:brace-expansion","fromFixed":"5.0.11","toFixed":"5.0.12","daysApart":0},{"kind":"version-step","provenance":"source","package":"npm:brace-expansion","fromFixed":"1.1.20","toFixed":"1.1.21","daysApart":0},{"kind":"same-code","provenance":"machine","files":["src/index.ts"],"commits":["https://github.com/juliangruber/brace-expansion/commit/33a5ef17b8d800bbfa8c52b14c39043b6aac1a96","https://github.com/juliangruber/brace-expansion/commit/bdff773f98e5988616b7039cc9b508df5d640b22","https://github.com/juliangruber/brace-expansion/commit/1efee7c397c191da6287a78ec19512476a966a7b","https://github.com/juliangruber/brace-expansion/commit/935d78f32f335b2ff76578e5c5e877d31ae9888c"],"basis":"shared function","functions":["expand","expandTop","expand_"]}]},{"from":"CVE-2026-45149","to":"CVE-2026-102277","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/index.ts"],"commits":["https://github.com/juliangruber/brace-expansion/commit/33a5ef17b8d800bbfa8c52b14c39043b6aac1a96","https://github.com/juliangruber/brace-expansion/commit/bdff773f98e5988616b7039cc9b508df5d640b22","https://github.com/juliangruber/brace-expansion/commit/c0b095bdc52bc4c36dc88deddbadabc49f8371e5"],"basis":"shared function","functions":["expand_"]}]},{"from":"CVE-2026-13149","to":"CVE-2026-102277","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/index.ts"],"commits":["https://github.com/juliangruber/brace-expansion/commit/33a5ef17b8d800bbfa8c52b14c39043b6aac1a96","https://github.com/juliangruber/brace-expansion/commit/bdff773f98e5988616b7039cc9b508df5d640b22","https://github.com/juliangruber/brace-expansion/commit/c7e33ec13ac1a684c116720843ce24e208611754","https://github.com/juliangruber/brace-expansion/commit/835d6be91201122d9adffb0c0c8c094189ace265"],"basis":"shared function","functions":["expand_"]}]},{"from":"CVE-2026-14257","to":"CVE-2026-102277","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/index.ts"],"commits":["https://github.com/juliangruber/brace-expansion/commit/33a5ef17b8d800bbfa8c52b14c39043b6aac1a96","https://github.com/juliangruber/brace-expansion/commit/bdff773f98e5988616b7039cc9b508df5d640b22","https://github.com/juliangruber/brace-expansion/commit/a1bd33999ea75262c4749fff3bbb0d1372bd07b5","https://github.com/juliangruber/brace-expansion/commit/139d015104e71433ad52a41d19467c48ecbb2c7d"],"basis":"shared function","functions":["expand","expandTop","expand_"]}]},{"from":"CVE-2026-69152","to":"CVE-2026-102277","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/juliangruber/brace-expansion/commit/33a5ef17b8d800bbfa8c52b14c39043b6aac1a96","https://github.com/juliangruber/brace-expansion/commit/bdff773f98e5988616b7039cc9b508df5d640b22","https://github.com/juliangruber/brace-expansion/commit/139d015104e71433ad52a41d19467c48ecbb2c7d","https://github.com/juliangruber/brace-expansion/commit/1e30c930238d7162802d88a94189182def178dac"],"basis":"shared function","functions":["expandTop"]}]}],"packageHistory":[{"cve":"CVE-2026-69152","published":"2026-08-03","fixed":"5.0.9","kev":false},{"cve":"CVE-2026-102276","published":"2026-09-28","fixed":"5.0.10","kev":false},{"cve":"CVE-2026-102278","published":"2026-09-28","fixed":"5.0.11","kev":false},{"cve":"CVE-2026-102277","published":"2026-09-28","fixed":"5.0.12","kev":false}],"package":"npm:brace-expansion"}}