CVE-2026-128139
Awaiting Analysis Awaiting Analysis - Queue

XML Parsing Quadratic CPU Consumption in NLTK

Vulnerability report for CVE-2026-128139, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-19

Last updated on: 2026-11-19

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-19
Last Modified
2026-11-19
Generated
2026-11-20
AI Q&A
2026-11-20
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
nltk nltk From 3.6 (inc) to 3.10.3 (inc)
nltk nltk 3.10.4

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-407 An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.
CWE-400 The product does not properly control the allocation and maintenance of a limited resource.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects NLTK versions 3.6 to 3.10.3. It involves XMLCorpusView._read_xml_fragment repeatedly validating large XML buffers when comments or CDATA sections are present. An attacker can craft a corpus file with a large comment or CDATA section to cause excessive CPU usage, leading to a denial of service.

Detection Guidance

This vulnerability is specific to NLTK versions 3.6 to 3.10.3 and involves XML parsing in corpus files. To detect it, check your NLTK version with 'pip show nltk' or 'python -c "import nltk; print(nltk.__version__)"'. If the version is within the affected range, the system is vulnerable.

Impact Analysis

If you use NLTK versions 3.6 to 3.10.3 with XML corpus readers, an attacker could exploit this to consume excessive CPU resources, slowing down or crashing your system. This is especially risky if processing untrusted corpus files.

Mitigation Strategies

Upgrade NLTK to version 3.10.4 or later immediately using 'pip install --upgrade nltk'. Avoid processing untrusted XML corpus files until the update is applied. Monitor system performance for signs of high CPU usage during XML processing.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-128139. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...