braces: Excessive Platform Resource Consumption within a Loop
CVE-2024-4068 is a high-severity excessive platform resource consumption within a loop vulnerability in braces from Micromatch, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 3.0.3 as the first without the flaw, so updating braces to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 1.47% chance of exploitation within 30 days, higher than 74% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update braces to 3.0.3 or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Micromatch | braces | 3.0.2 and earlier; before 3.0.3 | 3.0.3 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by CNA.
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Excessive Platform Resource Consumption within a Loop
The product has a loop body or loop condition that contains a control element that directly or indirectly consumes platform resources, e.g. messaging, sessions, locks, or file descriptors.
More Excessive Platform Resource Consumption within a Loop vulnerabilities (CWE-1050)
Timeline
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff
- github.com/micromatch/braces/pull/37Exploit, Issue Tracking
- github.com/micromatch/braces/pull/40Issue Tracking
Third-party and government advisories
- devhub.checkmarx.com/cve-details/CVE-2024-4068/Third Party Advisory
Other references
- github.com/micromatch/braces/issues/35Issue Tracking
Other vulnerabilities in braces
- 7.5 High severity
Recent Excessive Platform Resource Consumption within a Loop vulnerabilities
- 7.5 High severity
Spotted an error? Tell us.