Descrizione
braces through 3.0.3 contains a stack overflow vulnerability in the recursive AST walkers that lack depth guards. Attackers can supply deeply nested brace patterns under the character limit to exhaust the call stack and terminate the Node.js process with an uncaught RangeError.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5.
Versioni da aggiornare
Il record non riporta ancora i prodotti e le versioni corrette (analisi NVD in corso). Consultare l'advisory del vendor nei riferimenti.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Applicare rate limiting e limiti sulle risorse a monte del servizio e monitorarne la disponibilità.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Riferimenti
- Riferimentohttps://github.com/micromatch/braces
- Riferimentohttps://github.com/micromatch/braces/blob/3.0.3/lib/compile.js#L49-L53
- Riferimentohttps://github.com/micromatch/braces/blob/3.0.3/lib/expand.js#L102-L105
- Riferimentohttps://github.com/micromatch/braces/blob/3.0.3/lib/parse.js#L38-L40
- Riferimentohttps://github.com/micromatch/braces/issues/70
- Riferimentohttps://www.vulncheck.com/advisories/braces-through-3.0.3-stack-overflow-via-deeply-nested-patterns
- Riferimentohttps://github.com/advisories/ghsa-vfj7-8cjw-p6xm
- Riferimentohttps://github.com/micromatch/braces/issues/73#issuecomment-5996574974