Skip to main content

NLTK EUVDEUVD-2026-130433

| CVE-2026-128139 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-11-19 security-advisories@github.com GHSA-j8g8-j4j7-8j54
7.5
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft well-formed XML with large comment
  2. Delivery
    Deliver corpus file to victim NLTK reader
  3. Exploit
    XMLCorpusView re-scans whole buffer per 1 KiB block
  4. Execution
    Quadratic CPU consumption pins a core
  5. Impact
    Denial of service / job starvation

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to read an attacker-controlled, well-formed XML corpus file through nltk.corpus.reader.xmldocs.XMLCorpusView, or through the NPSChatCorpusReader / FramenetCorpusReader that are built on it. The malicious file must contain one large comment (quadratic on the entire affected 3.6-3.10.3 range) or a large CDATA section (incurs the quadratic scan before rejection on 3.6 and 3.9.2; read successfully and quadratic on 3.10.3), with '<'/'>' characters inside and the '-->' or ']]>' terminator placed far ahead so the comment/CDATA stays unclosed across 1 KiB blocks. The GHSA-vp2x in_tag guard only covers a single oversized '<...>' tag and does not cover the comment/CDATA path, so that path remains quadratic through 3.10.3. Limiting factors: the attacker must control the corpus-file input, so only deployments that ingest untrusted XML corpora (uploaded, packaged, or loader-fetched) are exposed; the impact is CPU exhaustion of a single core with no confidentiality or integrity effect; there is no network service to reach directly and no privilege or interactive user step beyond the automated file read.

Impact

The signals point to a real but bounded priority. The CVSS 3.1 base score is 7.5 (HIGH) driven entirely by availability (A:H) with no confidentiality or integrity impact, and the vector AV:N/AC:L/PR:N/UI:N implies trivial remote unauthenticated triggering. However, the vendor advisory's own AV:N/UI:N justification rests on an automated-ingestion threat model: the attacker does not reach a listening service but must get a victim pipeline, CI job, or notebook to read an attacker-controlled XML corpus file via XMLCorpusView (or the nps_chat/framenet readers built on it). That is a meaningful limiting condition that the raw vector hides. No EPSS score and no CISA KEV entry are present in the input, so there is no evidence of active or widespread exploitation; the vuln.today Decision label is 'this_week' (not act_now/emergency), consistent with a prioritize-soon rather than drop-everything posture. A concrete, dynamically-reproduced PoC exists inside the GHSA advisory (confirmed across 3.6, 3.9.2, 3.10.3 and develop), which raises exploitability confidence, but the impact ceiling is CPU exhaustion of a single core, not code execution or data loss. Net: a genuine algorithmic-complexity DoS worth patching promptly for anyone ingesting untrusted corpus XML, but its real-world blast radius is narrower than the 7.5/AV:N headline suggests because exploitation depends on feeding untrusted XML to a specific NLTK reader.

Exploit ScenarioDerived

An attacker supplies a well-formed XML corpus file whose body contains one large comment (or, on 3.6/3.9.2, a CDATA section) with '<'/'>' characters and the terminator placed near the end, then gets a victim service, CI pipeline, or notebook to read it through NLTK's XMLCorpusView. Because _read_xml_fragment re-runs whole-buffer XML validation after every 1 KiB block while the terminator is still ahead, a few-MiB file consumes tens of seconds of CPU and tens of MiB reaches minutes, pinning a core (measured t(4n)/t(n) ≈ 13-16, i.e. quadratic). A self-checking PoC reproduction script is embedded in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 19, 2026

Reading a crafted, fully well-formed XML corpus file through NLTK's XMLCorpusView (and the NPSChatCorpusReader / FramenetCorpusReader built on it) pins a CPU core for time quadratic in file size in NLTK 3.6 through 3.10.3, because the streaming reader re-validates the entire accumulated buffer after every 1 KiB block while a comment or CDATA section is still unclosed. Remote, unauthenticated attackers can exploit this only where a service, CI job or notebook ingests corpus XML from an untrusted source; impact is limited to availability (C:N/I:N/A:H) with no confidentiality or integrity effect. No confirmed active exploitation (not in CISA KEV) was reported, but a public proof-of-concept timing script is described in the GitHub advisory, and the flaw is fixed in 3.10.4.

RemediationAI

Vendor-released patch: upgrade nltk to 3.10.4 (PyPI release; upstream fix commit 9cacbb95d97eaac7debb30d6e7decbe74d2c635f, release tag https://github.com/nltk/nltk/releases/tag/v3.10.4, advisory https://github.com/nltk/nltk/security/advisories/GHSA-j8g8-j4j7-8j54). The advisory states the issue is fixed in 3.10.4 and does not document an in-version workaround, so patching is the only complete remediation for 3.6 through 3.10.3. Until the upgrade is deployed, the practical compensating control is to stop passing untrusted corpus XML to XMLCorpusView, NPSChatCorpusReader or FramenetCorpusReader (for example pre-validate or sanitize corpus files so no large comment or CDATA section carries '<'/'>' characters with a distant terminator); the trade-off is that legitimate corpora using large commented or CDATA blocks may be rejected, and any sanitizer must be applied before the reader rather than after. Because measured cost grows roughly with the square of input size, imposing a strict file-size ceiling and a per-read CPU timeout on corpus ingestion bounds single-read damage at the cost of refusing genuinely large corpora and adding scheduling complexity.

Affected VersionsENISA

nltk 3.6, < 3.10.4

Affected Packages

pypi nltk fix: 3.10.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is an algorithmic-complexity flaw (CWE-400 resource exhaustion via CWE-407) in nltk/corpus/reader/xmldocs.py. XMLCorpusView._read_xml_fragment accumulates the input into a single 'fragment' string in _BLOCK_SIZE (1024-character) chunks and, after each block that is not yet a well-formed prefix, re-runs the whole-buffer _VALID_XML_RE.match() against the fragment and against the prefix up to the last '<'. The regex itself is linear, but when a comment or CDATA terminator lies far ahead, every one of the roughly n/1024 blocks pays a linear scan of the current buffer, giving ~O(n^2) total work. The in_tag guard introduced for GHSA-vp2x tracks only bare '<'/'>' characters and therefore only protects a single oversized tag; XML permits '<' and '>' inside comments and CDATA, so that path stays quadratic. Version behavior differs: on 3.10.3 and develop the regex validates CDATA correctly, so both comment and CDATA documents read successfully and super-linearly; on 3.6 and 3.9.2 a lazy _VALID_XML_RE whose CDATA alternative is parsed as a character class rejects CDATA documents with ValueError after the quadratic scan, while the comment variant remains a clean, well-formed, quadratic read. The fix commit 9cacbb95d97eaac7debb30d6e7decbe74d2c635f makes the read window grow exponentially (read_size *= 2) so whole-buffer re-scans stay O(log n) passes, mirroring read_sexpr_block; the same commit also removes quadratic pop(0) loops in the CoNLL SRL and TIMIT readers.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

A single crafted comment/CDATA reliably triggers quadratic CPU (AC:L) with no privilege or user step beyond the automated corpus read (PR:N/UI:N); impact is availability-only (A:H), AV:N following the advisory's automated-ingestion model.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 19:34 EUVD
CVE Published
Nov 19, 2026 - 18:18 cve.org
HIGH 7.5

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 pypi packages depend on nltk (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.6.

Technical POC Analysis

CWE-400 (resource exhaustion), specifically the algorithmic-complexity variant the advisory labels CWE-407.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity XML parsing vulnerability in NLTK versions 3.6 through 3.10.3 allows remote, unauthenticated attackers to cause a denial-of-service by supplying a crafted XML corpus file that pins a CPU core, impacting availability for any service, CI job, or notebook that ingests untrusted corpus XML. While no active exploitation has been observed, a public proof-of-concept exists, and the flaw is fixed in version 3.10.4. Leadership should prioritize patching affected systems to prevent service disruptions and maintain operational resilience.

Business Impact: High
Compensating Controls

Vendor-released patch: NLTK 3.10.4

Threat Intelligence Overview

EPSS Score
0.7%
Top 47% exploitable
Prevalence
High
NLTK is a very widely deployed open-source Python NLP library
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy