Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify application accepting XML corpus input
-
DeliveryCraft malformed XML file maximizing buffer accumulation
-
ExploitSubmit file via upload endpoint or API
-
ExecutionXMLCorpusView rescans buffer quadratically per 1 KiB block
-
PersistCPU resources exhausted
-
ImpactService denial
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 ability to supply a malformed XML corpus file to an application that passes attacker-controlled input to NLTK's XMLCorpusView or a derived reader such as BNCCorpusReader. The application must not sanitize, size-limit, or validate corpus files before forwarding them to NLTK. The CVSS 4.0 AT:P metric confirms a specific precondition: the deployment must accept untrusted XML corpus input rather than operating only over internal, pre-validated datasets. Standard offline NLTK usage - a data scientist loading their own corpora in a Jupyter notebook or a batch pipeline consuming trusted files - is not exploitable. Exploitation is further limited by AC:H: the attacker must craft a file that specifically triggers the quadratic rescan pattern, and must have a pathway (network upload, API call, or shared file system access) to deliver that file to the processing application. |
| Impact | The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N/VA:L) yields a score of 6.3. The AT:P metric explicitly signals that specific attack prerequisites must be present - the application must accept and forward attacker-controlled XML corpus data to NLTK readers. Real-world risk is meaningfully lower than the surface CVSS score implies: NLTK is predominantly used in offline NLP pipelines, Jupyter notebooks, and research tooling rather than as internet-facing infrastructure. Applications that do accept external corpus uploads or user-defined file paths to XML readers represent the realistic attack surface. No EPSS score was provided in the intelligence feed, so quantified exploitation probability is unavailable. The official VA:L rating may understate CPU impact for large malformed inputs given the description explicitly characterizes the exhaustion as 'severe' - defenders should treat availability impact as closer to high in contexts where the application processes large or unbounded XML corpus files from untrusted sources. No KEV listing and no identified POC code further reduce immediate urgency for most deployments. |
| Exploit ScenarioDerived | An attacker with access to a web API or file-upload endpoint that feeds user-provided corpora into an NLTK-based NLP pipeline submits a specially crafted malformed XML file targeting the XMLCorpusView reader. As the application processes the file in 1 KiB blocks, CPU consumption grows quadratically, progressively starving other processes on the host and degrading or halting service availability for legitimate users. No POC code has been identified, but the algorithmic nature of the flaw means any developer familiar with NLTK internals could reproduce it from the public description. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 27, 2026
Quadratic CPU exhaustion in NLTK before 3.10.3 allows denial of service via malformed XML corpus files processed by XMLCorpusView._read_xml_fragment(). The method rescans the entire accumulated XML buffer on every 1 KiB block read, creating O(n²) time complexity that scales severely with input size. Applications exposing XML corpus ingestion to untrusted input - such as those using BNCCorpusReader - are at realistic risk; no public exploit has been identified and this is not listed in CISA KEV.
RemediationAI
Upgrade NLTK to version 3.10.3 or later, which resolves the quadratic rescanning behavior in XMLCorpusView._read_xml_fragment() per the vendor advisory at https://github.com/nltk/nltk/security/advisories/GHSA-vp2x-qp44-57v7. For deployments that cannot immediately upgrade, restrict the application so that BNCCorpusReader and other XMLCorpusView-based readers only process files from trusted, pre-vetted sources - never from user-uploaded or externally supplied paths. If processing external corpus files is a business requirement, enforce an application-layer file size cap (for example, reject files larger than a few megabytes) before passing them to NLTK; this limits the quadratic amplification factor but does not eliminate the vulnerability. Note that file size limits are a compensating control only: even moderately-sized crafted files can cause measurable CPU degradation due to O(n²) complexity.
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
NLTK (Natural Language Toolkit) is a Python library used extensively in NLP, academic research, and data science pipelines. The flaw originates in XMLCorpusView._read_xml_fragment(), which buffers XML data in 1 KiB increments but incorrectly rescans the entire accumulated buffer from the start on each new block arrival rather than maintaining a parse cursor. This produces O(n²) CPU complexity - a classic algorithmic complexity vulnerability classified under CWE-400 (Uncontrolled Resource Consumption). The BNCCorpusReader and any other reader derived from XMLCorpusView inherit this behavior. CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* covers all NLTK versions prior to 3.10.3.
Know when Nltk 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
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
Network-reachable but requires application to forward attacker-supplied XML corpus files to NLTK (AC:H); severe CPU exhaustion described warrants A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
NLTK versions before 3.10.3 contain a quadratic CPU exhaustion vulnerability in XMLCorpusView._read_xml_fragment() that rescans accumulated XML fragments on every 1 KiB block read. Attackers can provide malformed XML corpus files to cause severe CPU consumption and denial of service through affected readers like BNCCorpusReader.
Blast Radius
ecosystem impact- 10 pypi packages depend on nltk (9 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.10.3.
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.
Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p
Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic
Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow
StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc
Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to
Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers
Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse
XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s
Server-side request forgery in NLTK before 3.10.3 allows unauthenticated remote attackers to reach internal HTTP service
Symlink escape in NLTK's CorpusReader.open() allows local attackers to read arbitrary files outside the designated corpu
Path traversal in NLTK's FramenetCorpusReader and NKJPCorpusReader (all versions before 3.10.0) enables unauthenticated
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research a
EUVD-2026-67073
GHSA-hqv3-xm29-p9hq
NVD
CVE.org
EPSS
VulDB
Exploit-DB