GHSA-jxxr-4gwj-5jf2

Suggest an improvement
Source
https://github.com/advisories/GHSA-jxxr-4gwj-5jf2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-jxxr-4gwj-5jf2/GHSA-jxxr-4gwj-5jf2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jxxr-4gwj-5jf2
Aliases
  • CVE-2026-45149
Downstream
Related
Published
2026-05-18T16:22:01Z
Modified
2026-05-20T14:14:16.304952608Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H CVSS Calculator
Summary
brace-expansion: Large numeric range defeats documented `max` DoS protection
Details

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.

Workaround

Ensure the string to be expanded doesn't contain more values than the desired max item count.

Database specific
{
    "cwe_ids": [
        "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-18T16:22:01Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
}
References

Affected packages

npm / brace-expansion

Package

Affected ranges

Type
SEMVER
Events
Introduced
5.0.0
Fixed
5.0.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-jxxr-4gwj-5jf2/GHSA-jxxr-4gwj-5jf2.json"