1. Archivio CVE
  2. 2026
  3. CVE-2026-72818

CVE-2026-72818

7.5 Gravità alta CVSS v3.1 · fonte NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H 7.5 – Alta

Descrizione

The URLS regular expression in nltk/tokenize/casual.py, compiled into TweetTokenizer.WORD_RE and applied by TweetTokenizer.tokenize, contains a naked-domain branch whose domain-label prefix [a-z0-9]+(?:[.\-][a-z0-9]+)* is unbounded. Input consisting of many alternating label separators can be partitioned in exponentially many ways, and because the branch also requires a trailing top-level domain that such input never supplies, the engine explores those partitions before failing at each offset. A few kilobytes of input therefore consumes seconds to minutes of single-threaded CPU, and the HANG_RE substitution performed before matching does not collapse the pattern. TweetTokenizer is intended for tokenizing untrusted social-media text, so any service that applies it, or the module-level casual_tokenize, to submitted text can be stalled per request without authentication. Version 3.10.1 bounds the label repetition.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
nltk nltk 3.9.3 –
nltk nltk 3.9.2 –
nltk nltk 3.9.1 –
nltk nltk 3.9 –
nltk nltk 3.9 beta1 –
nltk nltk 3.8.1 –
nltk nltk 3.8 –
nltk nltk 3.7 –
nltk nltk 3.6.5 –
nltk nltk 3.6.6 –
nltk nltk 3.6.7 –
Tutte le 77 vulnerabilità di Nltk

Tipo di vulnerabilità

CWE-1333 Espressione regolare inefficiente (ReDoS)

Il prodotto usa un’espressione regolare che nel caso peggiore ha una complessità di calcolo molto alta, anche esponenziale: un input costruito ad arte può bloccare il servizio.

Impatto sui sistemi

AmbitoImpatto
Disponibilità Interruzione del servizio: esaurimento della CPU

Come si previene

Architettura e progettazione Use regular expressions that do not support backtracking, e.g. by removing nested quantifiers.
Configurazione del sistema Set backtracking limits in the configuration of the regular expression implementation, such as PHP's pcre.backtrack_limit. Also consider limits on execution time for the process.
Sviluppo Do not use regular expressions with untrusted input. If regular expressions must be used, avoid using backtracking in the expression.
Sviluppo Limit the length of the input that the regular expression will process.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 543 CVE di tipo CWE-1333, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org