Descrizione
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.10.0 until 3.10.4, TokenSearcher.findall and Text.findall accept caller-controlled regular expressions with an unbounded number of capturing groups throughout the affected range. Starting in 3.10.3, nltk.redos.compile and RegexpTokenizer expose the same compile-time vector. The third-party regex engine compiles group-dense patterns with roughly quadratic cost before the match-time timeout begins, allowing a small unauthenticated request to exhaust CPU and deny service. This issue is fixed in version 3.10.4.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5, EPSS 0.5% (percentile 45).
Versioni da aggiornare
- nltk nltk: vulnerabile la versione
>= 3.10.0, < 3.10.4→ installare l'ultima release supportata dal vendor.
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.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| nltk | nltk | >= 3.10.0, < 3.10.4 | — |
Riferimenti
- Riferimentohttps://github.com/nltk/nltk/commit/002bcf714ef8cb8baf94436f4be73e5516914412
- Riferimentohttps://github.com/nltk/nltk/pull/3895
- Riferimentohttps://github.com/nltk/nltk/releases/tag/v3.10.4
- Riferimentohttps://github.com/nltk/nltk/security/advisories/GHSA-32p6-cwhc-8r78
- Riferimentohttps://github.com/nltk/nltk/security/advisories/GHSA-32p6-cwhc-8r78