{"id":"CVE-2026-45149","published":"2026-05-29T19:55:07Z","modified":"2026-06-01T16:44:23Z","title":"brace-expansion: Large numeric range defeats documented `max` DoS protection","vendor":"juliangruber","product":"brace-expansion","tier":"tail","description":{"text":"The brace-expansion library generates arbitrary strings containing a common prefix and suffix. From 5.0.0 to before 5.0.6, the max option was being applied too late. When expanding a single large numeric range like {1..10000000}, the sequence generation loop generates all 10 million intermediate elements before the max limit is applied With max=10, the output is correctly limited to 10 items, but the process still allocates ~505 MB and spends ~800ms building the full intermediate array. This vulnerability is fixed in 5.0.6.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.003,"percentile":0.23295,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/juliangruber/brace-expansion/security/advisories/GHSA-jxxr-4gwj-5jf2","tags":["x_refsource_CONFIRM"]}],"priority":{"score":9.2,"factors":[{"name":"EPSS percentile","points":4.66},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"juliangruber","affectedVersions":[{"vendor":"juliangruber","product":"brace-expansion","versions":[">= 5.0.0, < 5.0.6"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-01T16:42:12.730782Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"brace-expansion","vulnerableRanges":[">=5.0.0, <5.0.6"],"patched":["5.0.6"],"from":["GHSA-jxxr-4gwj-5jf2"],"provenance":"source"}],"summary":{"text":"The brace-expansion library (juliangruber/brace-expansion) from 5.0.0 before 5.0.6 applies its documented max limit only after generating the full sequence for a large numeric range, so expanding a range like {1..10000000} still builds every intermediate element before truncation. An attacker who can supply a brace pattern to the library, and a user who triggers its processing (the attack vector requires user interaction and no privileges), can cause roughly 505 MB of memory allocation and about 800 ms of work per expansion, resulting in a denial of service even when max is set.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:07:36Z"},"euvd":{"id":"EUVD-2026-33442","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-juliangruber-brace-expansion-cve-2026-45149","children":[{"from":"CVE-2026-45149","to":"CVE-2026-13149","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:brace-expansion","fromFixed":"5.0.6","toFixed":"5.0.7","daysApart":32},{"kind":"same-code","provenance":"machine","files":["src/index.ts"],"commits":["https://github.com/juliangruber/brace-expansion/commit/c7e33ec13ac1a684c116720843ce24e208611754","https://github.com/juliangruber/brace-expansion/commit/835d6be91201122d9adffb0c0c8c094189ace265","https://github.com/juliangruber/brace-expansion/commit/c0b095bdc52bc4c36dc88deddbadabc49f8371e5"],"basis":"shared function","functions":["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-45149","to":"CVE-2026-102278","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/index.ts"],"commits":["https://github.com/juliangruber/brace-expansion/commit/1efee7c397c191da6287a78ec19512476a966a7b","https://github.com/juliangruber/brace-expansion/commit/935d78f32f335b2ff76578e5c5e877d31ae9888c","https://github.com/juliangruber/brace-expansion/commit/c0b095bdc52bc4c36dc88deddbadabc49f8371e5"],"basis":"shared function","functions":["expand_"]}]},{"from":"CVE-2026-45149","to":"CVE-2026-14257","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/index.ts"],"commits":["https://github.com/juliangruber/brace-expansion/commit/a1bd33999ea75262c4749fff3bbb0d1372bd07b5","https://github.com/juliangruber/brace-expansion/commit/139d015104e71433ad52a41d19467c48ecbb2c7d","https://github.com/juliangruber/brace-expansion/commit/c0b095bdc52bc4c36dc88deddbadabc49f8371e5"],"basis":"shared function","functions":["expand_"]}]}],"packageHistory":[{"cve":"CVE-2017-18077","published":"2018-01-27","fixed":"1.1.7","kev":false},{"cve":"CVE-2025-5889","published":"2025-06-09","fixed":"4.0.1","kev":false},{"cve":"CVE-2026-33750","published":"2026-03-27","fixed":"5.0.5","kev":false,"link":{"from":"CVE-2026-33750","to":"CVE-2026-45149","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:brace-expansion","fromFixed":"5.0.5","toFixed":"5.0.6","daysApart":63}]}},{"cve":"CVE-2026-45149","published":"2026-05-29","fixed":"5.0.6","kev":false},{"cve":"CVE-2026-13149","published":"2026-06-30","fixed":"5.0.7","kev":false},{"cve":"CVE-2026-14257","published":"2026-07-23","fixed":"5.0.8","kev":false},{"cve":"CVE-2026-69152","published":"2026-08-03","fixed":"5.0.9","kev":false}],"package":"npm:brace-expansion"}}