Skip to content

CVE-2026-33750 (Medium) detected in brace-expansion-1.1.11.tgz #34

@mend-bolt-for-github

Description

@mend-bolt-for-github

CVE-2026-33750 - Medium Severity Vulnerability

Vulnerable Library - brace-expansion-1.1.11.tgz

Brace expansion as known from sh/bash

Library home page: https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/brace-expansion/package.json

Dependency Hierarchy:

  • electron-rebuild-1.11.0.tgz (Root Library)
    • node-gyp-6.1.0.tgz
      • glob-7.2.3.tgz
        • minimatch-3.1.2.tgz
          • brace-expansion-1.1.11.tgz (Vulnerable Library)

Found in HEAD commit: ae62db6079d7852a74ec7949f57fe5a5bbcbe2a7

Found in base branch: master

Vulnerability Details

Impact A brace pattern with a zero step value (e.g., "{1..2..0}") causes the sequence generation loop to run indefinitely, making the process hang for seconds and allocate heaps of memory. The loop in question: https://github.com/juliangruber/brace-expansion/blob/daa71bcb4a30a2df9bcb7f7b8daaf2ab30e5794a/src/index.ts#L184 "test()" is one of https://github.com/juliangruber/brace-expansion/blob/daa71bcb4a30a2df9bcb7f7b8daaf2ab30e5794a/src/index.ts#L107-L113 The increment is computed as "Math.abs(0) = 0", so the loop variable never advances. On a test machine, the process hangs for about 3.5 seconds and allocates roughly 1.9 GB of memory before throwing a "RangeError". Setting max to any value has no effect because the limit is only checked at the output combination step, not during sequence generation. This affects any application that passes untrusted strings to expand(), or by error sets a step value of "0". That includes tools built on minimatch/glob that resolve patterns from CLI arguments or config files. The input needed is just 10 bytes. Patches Upgrade to versions - 5.0.5+ A step increment of 0 is now sanitized to 1, which matches bash behavior. Workarounds Sanitize strings passed to "expand()" to ensure a step value of "0" is not used.

Publish Date: 2026-03-26

URL: CVE-2026-33750

CVSS 3 Score Details (6.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-f886-m6hf-6m8v

Release Date: 2026-03-26

Fix Resolution: brace-expansion - 5.0.5


Step up your Open Source Security Game with Mend here

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions