Quadratic CPU denial of service in NLTK XML corpus parsing
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-400.
Summary
NLTK, a Python natural language toolkit, from 3.6 before 3.10.4 is affected. XMLCorpusView._read_xml_fragment repeatedly validates a growing buffer while a comment or CDATA terminator is still ahead, so a large comment in an attacker-controlled corpus file causes quadratic CPU consumption (CWE-407). A remote unauthenticated attacker can exhaust CPU and deny service to the process reading the file through documented XML corpus readers. The flaw is not listed in CISA KEV, and the sources report no public exploit.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
Description from the CNA
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.6 to 3.10.3, XMLCorpusView._read_xml_fragment accumulates 1 KiB blocks and repeatedly applies whole-buffer XML validation while a comment or CDATA terminator remains ahead. A large comment in an attacker-controlled corpus file causes quadratic CPU consumption through documented XML corpus readers across the affected range. On 3.6 and 3.9.2, a large CDATA section incurs the quadratic scan before rejection, while on 3.10.3 both comment and CDATA documents are read successfully. This vulnerability is fixed in 3.10.4.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nltk | nltk | 3.6 to before 3.10.4 | 3.10.4 | Patch available | CNA |
| — | nltk (PyPI) | 3.6 to before 3.10.4 | 3.10.4 | Patch available | GHSA-j8g8-j4j7-8j54 |
- nltk Vendornltk Affected 3.6 to before 3.10.4 Fixed in 3.10.4 Patch available CNA
- nltk (PyPI) Vendor— Affected 3.6 to before 3.10.4 Fixed in 3.10.4 Patch available GHSA-j8g8-j4j7-8j54
Remediation
Upgrade NLTK to version 3.10.4 on PyPI or from the nltk project, which fixes the flaw. The sources list no advisory identifier for this fix.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
- Fix · CNA nltk (nltk) Fixed in 3.10.4
- Fix · GHSA-j8g8-j4j7-8j54 nltk (PyPI) Fixed in 3.10.4 Advisory →
Timeline
- 2026-11-19 Threatist record created from CVE-2026-128139
- 2026-11-20 Alias added: GHSA-j8g8-j4j7-8j54
- 2026-11-20 Fix available: PyPI/[email protected] · GHSA-j8g8-j4j7-8j54
- 2026-11-20 CVSS score added · GHSA-j8g8-j4j7-8j54
- 2026-11-20 Weakness changed · GHSA-j8g8-j4j7-8j54
- 2026-11-20 5 new references · GHSA-j8g8-j4j7-8j54
- 2026-11-20 CISA SSVC decision points changed
- 2026-11-21 EPSS moved to the below the 50th percentile
References
More nltk vulnerabilities
- TI-2026-95059 NLTK incomplete fix allows JVM sandbox bypass via launcher tokens CVSS 3.1CRITICAL 9.8
- TI-2026-00629 Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading CVSS 3.0CRITICAL 10.0
- TI-2025-12800 Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution CVSS 3.0CRITICAL 10.0
- TI-2026-55173 NLTK before 3.10.3 JVM Argument Injection via Per-Call Options CVSS 4.0CRITICAL 9.3
- TI-2026-55155 NLTK before 3.10.3 Remote Code Execution via Unsafe Pickle Deserialization CVSS 4.0CRITICAL 9.3
- TI-2026-91242 Symlink escape in NLTK YCOECorpusReader lets attackers read files CVSS 4.0HIGH 8.7
Sources
- CVE-2026-128139 · CVE Program
- CVE-2026-128139 · NVD
- FIRST EPSS
- GHSA-j8g8-j4j7-8j54 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences