CVE-2024-4068 is a high-severity (CVSS 7.5) CWE-1050 vulnerability in braces. A fix is available for braces — see the affected versions and patch details below.
Memory Exhaustion in braces
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-4068.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
bracesnpmDescription
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
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | braces | all versions | 3.0.3npm install braces@3.0.3 |
Affected Products
bracesjonschlinkertDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for braces, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update braces to 3.0.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-4068 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Moderate impact: In Red Hat products and services that include the vulnerable NPM package `braces`, a remote, unauthenticated attacker can provide crafted input containing imbalanced braces. The parser may enter an unbounded loop and allocate heap memory without freeing it, exhausting the JavaScript heap and crashing…
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2024-4068 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| HawtIO 4.0.0 for Red Hat build of Apache Camel 4 | see advisory | RHSA-2024:11023 |
| multicluster engine for Kubernetes 2.4 for RHEL 8 | multicluster-engine/console-mce-rhel8:v2.4.5-25 | RHBA-2024:3555 |
| multicluster engine for Kubernetes 2.5 for RHEL 9 | multicluster-engine/console-mce-rhel9:v2.5.5-1 | RHBA-2024:4458 |
| Red Hat Advanced Cluster Management for Kubernetes 2.10 for RHEL 9 | rhacm2/console-rhel9:v2.10.4-13 | RHSA-2024:4464 |
| Red Hat Advanced Cluster Management for Kubernetes 2.9 for RHEL 8 | rhacm2/console-rhel8:v2.9.4-22 | RHBA-2024:3593 |
| Red Hat Developer Hub 1.3 on RHEL 9 | rhdh/rhdh-hub-rhel9:1.3-100 | RHBA-2024:7523 |
| Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 8 | eap7-hal-console-0:3.3.24-1.Final_redhat_00001.1.el8eap | RHSA-2024:8076 |
| Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 9 | eap7-hal-console-0:3.3.24-1.Final_redhat_00001.1.el9eap | RHSA-2024:8077 |
Frequently Asked Questions
Is CVE-2024-4068 in your dependencies?
Find it across npm, including transitive dependencies.