CVE-2026-45149: brace-expansion: Large numeric range defeats documented `max` DoS protection

Published May 18, 2026
·
Updated

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.

Other sources

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.

MITRE

Affected Software

4 affected componentsFixes available
npm/brace-expansion>=5.0.0<5.0.6
5.0.6
juliangruber Brace-expansion Node.js>=5.0.0<5.0.6
IBM Db2 Genius Hub<=1.1, 1.1.1, 1.1.2
IBM Agentics<=1.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/brace-expansion to a version that resolves this vulnerability.

    Fixed in 5.0.6
  2. Upgrade

    Upgrade brace-expansion to a version that resolves this vulnerability.

    Fixed in 5.0.6
  3. Configuration

    As a workaround, ensure the string to be expanded does not contain more values than the desired `max` item count.

    brace-expansion max = Ensure the input string does not contain more values than the desired max item count.

Event History

May 18, 2026
Advisory Published
via GitHub·04:22 PM
Data Sourced
via GitHub·04:22 PM
DescriptionSeverityWeaknessAffected Software
May 29, 2026
CVE Published
via MITRE·07:55 PM
Data Sourced
via MITRE·07:55 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:16 PM
DescriptionSeverityWeaknessAffected Software
Jul 13, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-45149?

CVE-2026-45149 has a medium severity due to performance issues when handling large numeric ranges.

2

How do I fix CVE-2026-45149?

To fix CVE-2026-45149, update the `brace-expansion` package to version 5.0.6 or later.

3

What component is affected by CVE-2026-45149?

CVE-2026-45149 affects the `brace-expansion` package in versions from 5.0.0 to 5.0.6.

4

What is the impact of CVE-2026-45149?

The impact of CVE-2026-45149 includes potential excessive memory consumption when generating large sequences.

5

Is CVE-2026-45149 publicly disclosed?

Yes, CVE-2026-45149 has been publicly disclosed as part of a security advisory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203