Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply attacker-influenced corpus XML to an XMLCorpusView reader
-
ExploitNest start tags that never match the tagspec
-
ExecutionForce per-tag quadratic path rebuild in read_block
-
ImpactExhaust a single CPU core, denying service
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 that the target application pass untrusted or attacker-influenced XML corpus data into an NLTK XMLCorpusView subclass reader - specifically the nps_chat, framenet, bnc, mte, nkjp, or semcor readers, or any custom XMLCorpusView with a concrete anchored tagspec. The attacker must control the XML body and supply deeply nested start tags whose path never completes a full match against the reader's tagspec (e.g. '<a>' x n then '</a>' x n), which keeps elt_start None and drives the per-start-tag '/'.join(context) rebuild across all n depths. No authentication, privilege, or user interaction is needed (PR:N/UI:N) once such input reaches the reader. The key limiting factor is deployment-specific: applications that only parse trusted, bundled, shallow corpus files are not realistically exposed, since real corpora are shallow (the fix caps depth at 500). There is no platform or version constraint beyond running NLTK <= 3.10.3. |
| Impact | This is a genuine but moderate-priority availability issue, not a high-urgency emergency. The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, base 5.3 MEDIUM) and the SSVC-style vuln.today decision label 'this_month' agree: unauthenticated, low-complexity, but impact is limited to availability (A:L) of a single processing worker/core with no confidentiality or integrity effect. The vuln.today 'this_month' label signals schedule-within-normal-cycle, not act_now or emergency. No CISA KEV listing and no EPSS score are provided in the input, so there is no evidence of active or at-scale exploitation; the GitHub Security Advisory (GHSA-cj8f-5fp3-6m88) includes a detailed proof-of-concept benchmark demonstrating the O(n^2) behavior, so exploitability is well established even though weaponized in-the-wild use is not. The practical risk is gated by a real deployment prerequisite not captured in the CVSS network vector: the application must actually feed untrusted or attacker-influenced XML corpus data through an XMLCorpusView subclass reader (nps_chat, framenet, bnc, mte, nkjp, semcor), which is not the default path for most NLTK consumers - so AV:N overstates reach for deployments that only parse trusted bundled corpora. Note a timeline nuance: the advisory snapshot dated 2026-09-28 marks the fix as IN PROGRESS on open PR #3895 (not yet released), while the CVE description and the version metadata state it is fixed in 3.10.4; treat 3.10.4 as the fixed release but verify the installed version, since the advisory text itself was written before that release shipped. |
| Exploit ScenarioDerived | An application that parses user-supplied or attacker-influenced XML corpus files through an NLTK XMLCorpusView subclass receives a crafted file containing deeply nested start tags (e.g. '<a>' repeated tens of thousands of times) whose path never matches the reader's anchored tagspec. Because read_block rebuilds the full '/'.join(context) path for every start tag as nesting depth grows, CPU cost scales quadratically, pinning one core for seconds to minutes (a ~200 KB file costs several seconds; a few-megabyte or unclosed file can hang the worker indefinitely). A public proof-of-concept benchmark demonstrating this quadratic scaling is published in the GHSA advisory; it is a reproduction/measurement script rather than a verified drop-in weaponized exploit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Quadratic CPU exhaustion in NLTK's XMLCorpusView.read_block (all releases through 3.10.3) lets an attacker who can supply or influence corpus XML pin a processing worker by nesting tags deeply: the reader rebuilds the whole root-to-node path with '/'.join(context) on every start tag while it is still hunting for a tagspec match, so n nested elements cost O(n^2) pure-Python string work. The affected surface is any XMLCorpusView subclass with a concrete anchored tagspec - the nps_chat, framenet, bnc, mte, nkjp and semcor readers, or custom views - reached without authentication or user interaction (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, 5.3), with impact limited to availability of the processing thread or process. The GitHub advisory ships a proof-of-concept reproduction with measured timings (n=32,000 nested tags ≈ 5.7 s, scaling ~3.6x per doubling, versus linear behavior for a flat negative control), so a public PoC reference exists; it is not verified as working exploit code beyond that reproduction, and there is no confirmation of active exploitation (no CISA KEV listing) at time of analysis. NLTK 3.10.4 fixes the issue by capping XML nesting depth at 500.
RemediationAI
Vendor-released patch: upgrade nltk to 3.10.4 or later (pip install --upgrade nltk), which adds MAX_XML_DEPTH = 500 in nltk/corpus/reader/xmldocs.py and makes XMLCorpusView.read_block raise ValueError('XML nesting depth exceeds MAX_XML_DEPTH') when the context stack grows past that bound; the same release reference is at https://github.com/nltk/nltk/releases/tag/v3.10.4 and the advisory at https://github.com/nltk/nltk/security/advisories/GHSA-cj8f-5fp3-6m88. Note the fix is a hard depth cap, not incremental path tracking, so it also rejects legitimately deep documents beyond 500 levels - a trade-off worth verifying against your corpus shapes before rollout. Where upgrading is not immediately possible, the documented interim mitigation is to enforce an upstream size limit on corpus XML handed to these readers and to avoid parsing untrusted or attacker-influenced corpus files through XMLCorpusView subclasses (nps_chat, framenet, bnc, mte, nkjp, semcor, or custom views); the advisory explicitly states this does not remove the quadratic behavior for inputs below the limit, so it reduces but does not eliminate the denial-of-service exposure. Isolating corpus parsing in a worker process with a CPU-time or wall-clock timeout limits the blast radius to that worker, at the cost of losing the in-process result and needing restart logic. At the time of the advisory the fix existed only on the open PR #3895 head; the released 3.10.4 artifact is the supported remediation path.
Affected VersionsENISA
Affected Packages
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 flaw is an algorithmic complexity problem (CWE-400, and CWE-407 as classified in the GHSA) in NLTK's XML corpus reader, not an XML parser or entity-expansion bug. XMLCorpusView.read_block maintains a context list that is appended on each start tag and popped on each end tag; while no target element has been located (elt_start is None), it recomputes the full path string with '/'.join(context) and matches it against the reader's anchored tagspec (tagspec + '\\Z'). With a concrete tagspec such as Session/Posts/Post, a path like a/a/a/... never completes a match, so elt_start stays None for the whole file and the join runs for every start tag at depths 1..n, summing to O(n^2) pure-Python cost; the empty-element variant that rebuilds '/'.join(context) + '/' + name has the same problem. The per-call regex timeout used elsewhere in the file does not observe this cumulative string-building cost, and no depth limit, context-length bound or work budget existed in read_block. The fix commit 002bcf714 ('Bound three quadratic algorithmic-DoS vectors on untrusted input', carried in PR #3895) introduces MAX_XML_DEPTH = 500 and raises a ValueError when len(context) exceeds it; the same commit also bounds a separate O(N^2) rescan in nltk/data.py's readline/splitlines logic and adds MAX_GROUP_COUNT = 1000 to nltk/redos.py to stop compile-time quadratic blowup from patterns with huge capturing-group counts, which are distinct vectors bundled into one hardening change. A reproduction through a real SeekableUnicodeStreamReader confirms the join is the quadratic term: identical tag counts in flat form stay linear (~2x per input doubling) while nested form grows toward ~4x per doubling.
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Attacker-supplied corpus XML can arrive over the network with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is limited to CPU exhaustion of one worker, so A:L and C:N/I:N.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.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. Prior to 3.10.4, XMLCorpusView.read_block rebuilds the full root-to-node context path with "/".join(context) for every start tag while searching for a matching element. Deeply nested attacker-influenced corpus XML therefore causes quadratic pure-Python work and can pin a processing worker, resulting in denial of service. This issue is fixed in version 3.10.4.
Blast Radius
ecosystem impact- 6,309 pypi packages depend on nltk (3,111 direct, 3,281 indirect)
Ecosystem-wide dependent count for version 3.10.4.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-130477
GHSA-cj8f-5fp3-6m88
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB