CVE-2024-4068Memory Exhaustion in braces
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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | node-braces | Fix pending | UBUNTU-CVE-2024-4068 | |
| Ubuntu 26.04 | node-braces | Under investigation | UBUNTU-CVE-2024-4068 | |
| Ubuntu 25.10 | node-braces | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-4068 | |
| Ubuntu 24.04 | node-braces | Under investigation | UBUNTU-CVE-2024-4068 | |
| Ubuntu 22.04 | node-braces | Under investigation | UBUNTU-CVE-2024-4068 | |
| Ubuntu 20.04 | node-braces | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-4068 | |
| Ubuntu 18.04 | node-braces | Fix pending | UBUNTU-CVE-2024-4068 | |
| Debian 14 | node-braces | Fixed | 3.0.3+~3.0.4-1 | DEBIAN-CVE-2024-4068 |
| Debian 13 | node-braces | Fixed | 3.0.3+~3.0.4-1 | DEBIAN-CVE-2024-4068 |
| Debian 12 | node-braces | Fix pending | DEBIAN-CVE-2024-4068 | |
| Red Hat Enterprise Linux 10 | nodejs-nodemon | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | gjs | Not affected | ||
| Red Hat Enterprise Linux 9 | gjs-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | nodejs-nodemon | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | pcs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | pcs-snmp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | polkit | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-docs | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-azure-monitor | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-cloudwatch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-elasticsearch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-graphite | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-influxdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-loki | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mssql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mysql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-opentsdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-postgres | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-prometheus | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-stackdriver | Not affected | ||
| Red Hat Enterprise Linux 8 | mozjs60 | Not affected | ||
| Red Hat Enterprise Linux 8 | mozjs60-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | nodejs-nodemon | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | pcs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | pcs-snmp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | firefox | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | thunderbird | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | firefox | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | thunderbird | Will not fix Out of support scope | ||
| npm library | braces | Fixed | 3.0.3 | GHSA-grv7-fg5c-xmjg |
What the vendor says
As published in the CVE record by Checkmarx, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- micromatch braces: affected: up to 3.0.2; fixed in
3.0.3
Solution: Update to version 3.0.3 to mitigate the issue.
References
- https://github.com/micromatch/braces/issues/35
- https://devhub.checkmarx.com/cve-details/CVE-2024-4068/
- https://github.com/micromatch/braces/pull/37
- https://github.com/micromatch/braces/pull/40
- https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.