{"id":"UBUNTU-CVE-2024-4068","details":"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.","modified":"2026-05-20T16:09:12.028181105Z","published":"2024-05-14T15:42:00Z","upstream":["CVE-2024-4068"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2024-4068"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2024-4068"},{"type":"REPORT","url":"https://github.com/micromatch/braces/issues/35"},{"type":"REPORT","url":"https://devhub.checkmarx.com/cve-details/CVE-2024-4068/"},{"type":"REPORT","url":"https://github.com/micromatch/braces/blob/98414f9f1fabe021736e26836d8306d5de747e0d/lib/parse.js#L308"}],"affected":[{"package":{"name":"node-braces","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/node-braces?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.2-1","2.0.2-2"],"ecosystem_specific":{"binaries":[{"binary_name":"node-braces","binary_version":"2.0.2-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-4068.json"}},{"package":{"name":"node-braces","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/node-braces?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.2-2"],"ecosystem_specific":{"binaries":[{"binary_name":"node-braces","binary_version":"3.0.2-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-4068.json"}},{"package":{"name":"node-braces","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/node-braces?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.2+~3.0.0-1","3.0.2+~3.0.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"node-braces","binary_version":"3.0.2+~3.0.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-4068.json"}},{"package":{"name":"node-braces","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/node-braces?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.2+~3.0.1-1"],"ecosystem_specific":{"binaries":[{"binary_version":"3.0.2+~3.0.1-1","binary_name":"node-braces"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-4068.json"}},{"package":{"name":"node-braces","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/node-braces?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.3+~3.0.4-1","3.0.3+~3.0.5-1"],"ecosystem_specific":{"binaries":[{"binary_name":"node-braces","binary_version":"3.0.3+~3.0.5-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-4068.json"}},{"package":{"name":"node-braces","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/node-braces?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.3+~3.0.5-1"],"ecosystem_specific":{"binaries":[{"binary_version":"3.0.3+~3.0.5-1","binary_name":"node-braces"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-4068.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}