Vulnerability · Published May 13, 2024 · Assigned by Checkmarx
CVE-2024-4068Memory Exhaustion in braces
High 7.5
In plain English
A high-severity uncontrolled resource consumption in braces from micromatch. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 74% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
The NPM package `braces`, versions prior to 3.0.3, fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In `lib/parse.js,` if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-braces | no fix listed | DEBIAN-CVE-2024-4068 |
| Debian:13 | node-braces | 3.0.3+~3.0.4-1 | DEBIAN-CVE-2024-4068 |
| Debian:14 | node-braces | 3.0.3+~3.0.4-1 | DEBIAN-CVE-2024-4068 |
| Ubuntu:22.04:LTS | node-braces | no fix listed | UBUNTU-CVE-2024-4068 |
| Ubuntu:24.04:LTS | node-braces | no fix listed | UBUNTU-CVE-2024-4068 |
| Ubuntu:25.10 | node-braces | no fix listed | UBUNTU-CVE-2024-4068 |
| Ubuntu:26.04:LTS | node-braces | no fix listed | UBUNTU-CVE-2024-4068 |
| Ubuntu:26.10 | node-braces | no fix listed | UBUNTU-CVE-2024-4068 |
| npm | braces | 3.0.3 | GHSA-grv7-fg5c-xmjg |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| micromatch | braces | 0 – through 3.0.2 |
Weakness: CWE-1050, CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H