7.5
HIGH CVSS 3.1
CVE-2024-4068
Apache Braces Heap Overflow
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.

INFO

Published Date :

May 14, 2024, 3:42 p.m.

Last Modified :

Aug. 4, 2025, 2:26 p.m.

Remotely Exploit :

Yes !

Source :

596c5446-0ce5-4ba2-aa66-48b3b757a647
Affected Products

The following products are affected by CVE-2024-4068 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Braces_project braces
1 Jonschlinkert braces
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 HIGH 596c5446-0ce5-4ba2-aa66-48b3b757a647
Solution
Update packages to address the memory exhaustion vulnerability in the braces library.
  • Update all affected packages to the latest versions.
  • If necessary, restart affected services or systems.
Public PoC/Exploit Available at Github

CVE-2024-4068 has a 2 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-4068 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2024-4068 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

None

JavaScript HTML CSS Dockerfile

Updated: 1 month, 4 weeks ago
0 stars 0 fork 0 watcher
Born at : June 22, 2025, 5:18 p.m. This repo has been linked 2 different CVEs too.

A centralized repository of standalone security patches for open source libraries.

appsec backport cve devsecops fix hotfix open-source patch protection remediation seal security update upgrade vulnerability

Updated: 1 year, 2 months ago
182 stars 0 fork 0 watcher
Born at : July 30, 2023, 4:46 p.m. This repo has been linked 265 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-4068 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-4068 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Aug. 04, 2025

    Action Type Old Value New Value
    Added CPE Configuration OR *cpe:2.3:a:jonschlinkert:braces:*:*:*:*:node.js:*:*:* versions up to (excluding) 3.0.3
    Added Reference Type CVE: https://devhub.checkmarx.com/cve-details/CVE-2024-4068/ Types: Third Party Advisory
    Added Reference Type Checkmarx: https://devhub.checkmarx.com/cve-details/CVE-2024-4068/ Types: Third Party Advisory
    Added Reference Type CVE: https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff Types: Patch
    Added Reference Type Checkmarx: https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff Types: Patch
    Added Reference Type CVE: https://github.com/micromatch/braces/issues/35 Types: Issue Tracking
    Added Reference Type Checkmarx: https://github.com/micromatch/braces/issues/35 Types: Issue Tracking
    Added Reference Type CVE: https://github.com/micromatch/braces/pull/37 Types: Exploit, Issue Tracking, Patch
    Added Reference Type Checkmarx: https://github.com/micromatch/braces/pull/37 Types: Exploit, Issue Tracking, Patch
    Added Reference Type CVE: https://github.com/micromatch/braces/pull/40 Types: Issue Tracking, Patch
    Added Reference Type Checkmarx: https://github.com/micromatch/braces/pull/40 Types: Issue Tracking, Patch
  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://devhub.checkmarx.com/cve-details/CVE-2024-4068/
    Added Reference https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff
    Added Reference https://github.com/micromatch/braces/issues/35
    Added Reference https://github.com/micromatch/braces/pull/37
    Added Reference https://github.com/micromatch/braces/pull/40
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Jul. 03, 2024

    Action Type Old Value New Value
    Added CWE CISA-ADP CWE-400
  • CVE Modified by 596c5446-0ce5-4ba2-aa66-48b3b757a647

    May. 22, 2024

    Action Type Old Value New Value
    Changed Description The NPM package `braces` 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. 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.
    Added Reference Checkmarx https://github.com/micromatch/braces/pull/37 [No types assigned]
    Added Reference Checkmarx https://github.com/micromatch/braces/pull/40 [No types assigned]
    Added Reference Checkmarx https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff [No types assigned]
    Removed Reference Checkmarx https://github.com/micromatch/braces/blob/98414f9f1fabe021736e26836d8306d5de747e0d/lib/parse.js#L308
  • CVE Received by 596c5446-0ce5-4ba2-aa66-48b3b757a647

    May. 14, 2024

    Action Type Old Value New Value
    Added Description The NPM package `braces` 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.
    Added Reference Checkmarx https://github.com/micromatch/braces/blob/98414f9f1fabe021736e26836d8306d5de747e0d/lib/parse.js#L308 [No types assigned]
    Added Reference Checkmarx https://github.com/micromatch/braces/issues/35 [No types assigned]
    Added Reference Checkmarx https://devhub.checkmarx.com/cve-details/CVE-2024-4068/ [No types assigned]
    Added CWE Checkmarx CWE-1050
    Added CVSS V3.1 Checkmarx AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 7.5
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact