# CVE-2024-4068: Memory Exhaustion in braces

- Severity: High 7.5 (CVSS:3.1, scored by Checkmarx) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.47%, higher than 74% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-05-13T10:06:38.152Z
- Modified: 2026-09-10T03:50:00.374Z
- Also known as: GHSA-grv7-fg5c-xmjg
- Weaknesses: CWE-400, CWE-1050
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: Checkmarx

## 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.

(As written by CVE List.)

## Affected

- braces: up to 3.0.2
- micromatch braces: before 3.0.3
- braces (npm): before 3.0.3
- jonschlinkert braces: before 3.0.3

## Every score

- Checkmarx: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/micromatch/braces/pull/37> (exploit, issue-tracking, patch, web)
- <https://github.com/micromatch/braces/issues/35> (issue-tracking, web)
- <https://devhub.checkmarx.com/cve-details/CVE-2024-4068/> (third-party-advisory)
- <https://github.com/micromatch/braces/pull/40> (issue-tracking, patch, web)
- <https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-4068> (advisory)
- <https://devhub.checkmarx.com/cve-details/CVE-2024-4068> (web)
- <https://github.com/micromatch/braces> (package)
- <https://github.com/micromatch/braces/blob/98414f9f1fabe021736e26836d8306d5de747e0d/lib/parse.js#L308> (web)

## Sources

- CVE List: [CVE-2024-4068](https://www.cve.org/CVERecord?id=CVE-2024-4068), CVE Terms of Use, modified 2024-11-06
- GitHub Advisory Database: [GHSA-grv7-fg5c-xmjg](https://github.com/advisories/GHSA-grv7-fg5c-xmjg), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-4068](https://nvd.nist.gov/vuln/detail/CVE-2024-4068), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-4068 · Whole record: https://cve.day/CVE-2024-4068.json · Rebuilt by cve.day 2026-11-25T22:58:40.220Z
