CVEfocus › CVE database › CVE-2024-4068

CVE-2024-4068Memory Exhaustion in braces

CVSS 7.5 HighEPSS 1.8% (higher than 80% of CVEs)Published 2024-05-13Updated 2024-11-06Assigner: Checkmarx

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.

CWE-1050CWE-400

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

3Fixed
4Fix pending
3Under investigation
12Will not fix
22Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10node-bracesFix pendingUBUNTU-CVE-2024-4068
Ubuntu 26.04node-bracesUnder investigationUBUNTU-CVE-2024-4068
Ubuntu 25.10node-bracesWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2024-4068
Ubuntu 24.04node-bracesUnder investigationUBUNTU-CVE-2024-4068
Ubuntu 22.04node-bracesUnder investigationUBUNTU-CVE-2024-4068
Ubuntu 20.04node-bracesWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2024-4068
Ubuntu 18.04node-bracesFix pendingUBUNTU-CVE-2024-4068
Debian 14node-bracesFixed3.0.3+~3.0.4-1DEBIAN-CVE-2024-4068
Debian 13node-bracesFixed3.0.3+~3.0.4-1DEBIAN-CVE-2024-4068
Debian 12node-bracesFix pendingDEBIAN-CVE-2024-4068
Red Hat Enterprise Linux 10nodejs-nodemonFix pending
Affected
Red Hat Enterprise Linux 9gjsNot affected
Red Hat Enterprise Linux 9gjs-develNot affected
Red Hat Enterprise Linux 9nodejs-nodemonWill not fix
Will not fix
Red Hat Enterprise Linux 9pcsWill not fix
Will not fix
Red Hat Enterprise Linux 9pcs-snmpWill not fix
Will not fix
Red Hat Enterprise Linux 9polkitNot affected
Red Hat Enterprise Linux 9polkit-develNot affected
Red Hat Enterprise Linux 9polkit-docsNot affected
Red Hat Enterprise Linux 9polkit-libsNot affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 8grafana-azure-monitorNot affected
Red Hat Enterprise Linux 8grafana-cloudwatchNot affected
Red Hat Enterprise Linux 8grafana-elasticsearchNot affected
Red Hat Enterprise Linux 8grafana-graphiteNot affected
Red Hat Enterprise Linux 8grafana-influxdbNot affected
Red Hat Enterprise Linux 8grafana-lokiNot affected
Red Hat Enterprise Linux 8grafana-mssqlNot affected
Red Hat Enterprise Linux 8grafana-mysqlNot affected
Red Hat Enterprise Linux 8grafana-opentsdbNot affected
Red Hat Enterprise Linux 8grafana-postgresNot affected
Red Hat Enterprise Linux 8grafana-prometheusNot affected
Red Hat Enterprise Linux 8grafana-selinuxNot affected
Red Hat Enterprise Linux 8grafana-stackdriverNot affected
Red Hat Enterprise Linux 8mozjs60Not affected
Red Hat Enterprise Linux 8mozjs60-develNot affected
Red Hat Enterprise Linux 8nodejs-nodemonWill not fix
Will not fix
Red Hat Enterprise Linux 8pcsWill not fix
Will not fix
Red Hat Enterprise Linux 8pcs-snmpWill not fix
Will not fix
Red Hat Enterprise Linux 7firefoxWill not fix
Out of support scope
Red Hat Enterprise Linux 7thunderbirdWill not fix
Out of support scope
Red Hat Enterprise Linux 6firefoxWill not fix
Out of support scope
Red Hat Enterprise Linux 6thunderbirdWill not fix
Out of support scope
npm librarybracesFixed3.0.3GHSA-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.

Solution: Update to version 3.0.3 to mitigate the issue.

References

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.