CVE-2024-4068: Uncontrolled resource consumption in braces
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.45177%
CWE
Published
5/14/2024
Updated
7/5/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| braces | npm | < 3.0.3 | 3.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the parse function's loop structure in lib/parse.js. Key evidence includes:
- The commit diff shows critical changes to the stack processing loop that previously caused unbounded memory growth
- The removed validate-input.js and MAX_SYMBOLS checks indicate insufficient input validation
- Multiple sources explicitly reference line 308 in parse.js (pre-patch) as the vulnerable loop
- The patch focused on simplifying the loop structure and reducing default MAX_LENGTH to prevent exploitation
- CWE-1050 (Excessive Platform Resource Consumption within a Loop) directly maps to this recursive block processing pattern