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.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.5%top 26.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12node-bracesno fix listedDEBIAN-CVE-2024-4068
Debian:13node-braces3.0.3+~3.0.4-1DEBIAN-CVE-2024-4068
Debian:14node-braces3.0.3+~3.0.4-1DEBIAN-CVE-2024-4068
Ubuntu:22.04:LTSnode-bracesno fix listedUBUNTU-CVE-2024-4068
Ubuntu:24.04:LTSnode-bracesno fix listedUBUNTU-CVE-2024-4068
Ubuntu:25.10node-bracesno fix listedUBUNTU-CVE-2024-4068
Ubuntu:26.04:LTSnode-bracesno fix listedUBUNTU-CVE-2024-4068
Ubuntu:26.10node-bracesno fix listedUBUNTU-CVE-2024-4068
npmbraces3.0.3GHSA-grv7-fg5c-xmjg

Affected products (as reported)

VendorProductVersions
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

References