NLTK before 3.10.3 contains a regular expression denial of service vulnerability in Pl196xCorpusReader that allows attackers to cause quadratic CPU consumption

PYSEC-2026-3752
MEDIUM 6.3OSV

En bref

Source
OSV
Publiée
Mise à jour
CVE
CVE-2026-81725
Alias
GHSA-8mpw-7fpc-4gqj
CVSS_V4
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Criticité de la CVE
MEDIUM 6.3 · CVE-2026-81725

Description

NLTK before 3.10.3 contains a regular expression denial of service vulnerability in Pl196xCorpusReader that allows attackers to cause quadratic CPU consumption by supplying malformed TEI blocks with many unmatched opening tags. Attackers can exploit lazy regex patterns in the read_block method through public APIs like words() and tagged_words() to force repeated rescans and achieve near-quadratic runtime growth.

Références

Paquets affectés

PaquetVersions
PyPI · nltkintroduced 0, fixed 3.10.3

Sources

SourceLicence
OSV.devCC-BY 4.0 — PyPA Advisory Database