{"id":"CVE-2024-4068","state":"PUBLISHED","title":"Memory Exhaustion in braces","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.","publishedAt":"2024-05-13T10:06:38.152Z","updatedAt":"2024-11-06T13:10:11.179Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Checkmarx"},"assigner":"Checkmarx","products":["micromatch braces"],"affected":[{"vendor":"micromatch","product":"braces","packageName":"braces","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThanOrEqual":"3.0.2","changes":[{"at":"3.0.3","status":"unaffected"}],"versionType":"git"}],"collectionURL":"https://www.npmjs.com/package/micromatch","programFiles":["lib/parse.js"],"repo":"https://github.com/micromatch/braces"}],"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"],"weaknesses":["CWE-1050","CWE-400"],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/4xxx/CVE-2024-4068.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-4068","state":"PUBLISHED","datePublished":"2024-05-13T10:06:38.152Z","dateUpdated":"2024-11-06T13:10:11.179Z","assignerShortName":"Checkmarx","assignerOrgId":"596c5446-0ce5-4ba2-aa66-48b3b757a647","dateReserved":"2024-04-23T13:31:17.738Z"},"containers":{"cna":{"title":"Memory Exhaustion in braces","descriptions":[{"lang":"en","value":"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":[{"vendor":"micromatch","product":"braces","packageName":"braces","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThanOrEqual":"3.0.2","changes":[{"at":"3.0.3","status":"unaffected"}],"versionType":"git"}],"collectionURL":"https://www.npmjs.com/package/micromatch","programFiles":["lib/parse.js"],"repo":"https://github.com/micromatch/braces"}],"references":[{"url":"https://github.com/micromatch/braces/issues/35"},{"url":"https://devhub.checkmarx.com/cve-details/CVE-2024-4068/"},{"url":"https://github.com/micromatch/braces/pull/37"},{"url":"https://github.com/micromatch/braces/pull/40"},{"url":"https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff"}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1050","description":"CWE-1050: Excessive Platform Resource Consumption within a Loop","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"Checkmarx","orgId":"596c5446-0ce5-4ba2-aa66-48b3b757a647","dateUpdated":"2024-11-06T13:10:11.179Z"},"credits":[{"lang":"en","type":"finder","user":"00000000-0000-4000-9000-000000000000","value":"Mário Teixeira, Checkmarx Research Group"}],"datePublic":"2024-05-13T12:44:00.000Z","solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"Update to version&nbsp;3.0.3 to mitigate the issue."}],"value":"Update to version 3.0.3 to mitigate the issue."}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"micromatch","product":"braces","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"3.0.3","versionType":"custom"}],"cpes":["cpe:2.3:a:micromatch:braces:3.0.3:*:*:*:*:*:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-05-13T11:10:08.649102Z","id":"CVE-2024-4068","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-400","type":"CWE","lang":"en","description":"CWE-400 Uncontrolled Resource Consumption"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-13T20:12:58.696Z"}},{"title":"CVE Program Container","references":[{"url":"https://github.com/micromatch/braces/issues/35","tags":["x_transferred"]},{"url":"https://devhub.checkmarx.com/cve-details/CVE-2024-4068/","tags":["x_transferred"]},{"url":"https://github.com/micromatch/braces/pull/37","tags":["x_transferred"]},{"url":"https://github.com/micromatch/braces/pull/40","tags":["x_transferred"]},{"url":"https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T20:26:57.297Z"}}]}}}