{"id":"CVE-2026-45149","aliases":["CVE-2026-45149","GHSA-jxxr-4gwj-5jf2"],"related":[],"kind":"vulnerability","state":"published","title":"brace-expansion: Large numeric range defeats documented `max` DoS protection","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"The `max` option was being applied too late:\n\nWhen 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.\n\n### Workaround\n\nEnsure the string to be expanded doesn't contain more values than the desired `max` item count.","format":"markdown","source":"ghsa"},{"lang":"es","text":"La biblioteca brace-expansion genera cadenas arbitrarias que contienen un prefijo y un sufijo comunes. Desde la versión 5.0.0 hasta antes de la 5.0.6, la opción max se estaba aplicando demasiado tarde. Al expandir un único rango numérico grande como {1..10000000}, el bucle de generación de secuencia genera los 10 millones de elementos intermedios antes de que se aplique el límite max. Con max=10, la salida se limita correctamente a 10 elementos, pero el proceso sigue asignando ~505 MB y gasta ~800ms en construir el array intermedio completo. Esta vulnerabilidad se corrige en la versión 5.0.6.","source":"nvd"}],"published":"2026-05-18T16:22:01.000Z","modified":"2026-09-10T03:51:06.302Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":">= 5.0.0, < 5.0.6","status":"affected"}],"vendor":"juliangruber","product":"brace-expansion","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.0.6"}],"ecosystem":"npm","package":"brace-expansion","purl":"pkg:npm/brace-expansion","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"5.0.0","fixed":"5.0.6"}],"vendor":"juliangruber","product":"brace-expansion","cpe":"cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/juliangruber/brace-expansion/security/advisories/GHSA-jxxr-4gwj-5jf2","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45149","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/juliangruber/brace-expansion/commit/c0b095bdc52bc4c36dc88deddbadabc49f8371e5","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/juliangruber/brace-expansion","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-01T16:42:12.730Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45149","url":"https://www.cve.org/CVERecord?id=CVE-2026-45149","licence":"CVE Terms of Use","modified":"2026-06-01T16:44:23.371Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jxxr-4gwj-5jf2","url":"https://github.com/advisories/GHSA-jxxr-4gwj-5jf2","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:06.302Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45149","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45149","licence":"Public domain","modified":"2026-07-22T06:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:23.363Z","epss":{"score":0.003,"percentile":0.2444,"date":"2026-12-02T12:00:21.000Z"}}