Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify service accepting untrusted text input
-
DeliveryCraft token of ~30k 'y' chars + suffix
-
ExploitSubmit via HTTP or API request
-
InstallPorterStemmer.stem() invoked on payload
-
C2_measure() triggers O(n²) _is_consonant() calls
-
ExecuteCPU core pinned for seconds to minutes
-
ImpactService thread unavailable to legitimate users
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires that the target application calls NLTK's PorterStemmer.stem() on text that includes attacker-controlled tokens without enforcing a maximum token length. This is not a default-configuration attack against NLTK itself - NLTK is a library, not a standalone service, so exploitation depends entirely on how the application integrates it. The specific triggering condition is a single token of approximately 20,000-50,000 characters consisting predominantly of the letter 'y' followed by a recognized English suffix (e.g., 'ness', 'ly'). Applications that pre-tokenize input using standard whitespace splitting are still vulnerable if they do not cap individual token length. Limitations on exploitation: the attack requires network access to an endpoint that invokes PorterStemmer on user input; applications that only stem internal or pre-validated corpora are not exposed; and the impact is bounded to a single CPU core per request on multi-core systems with proper process isolation, which reduces but does not eliminate availability risk. Authentication requirements are not intrinsic to the vulnerability - they depend entirely on whether the exposing application requires authentication, which cannot be determined from library-level CVE data alone. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H) scores 8.7, reflecting that the attack requires no authentication, no special network position, and no user interaction - consistent with the description. The pure availability impact (VC:N/VI:N) is accurate: there is no confidentiality or integrity consequence. The practical exploitability, however, is narrower than a raw CVSS reading suggests: the vulnerable code path is only reachable if the application pipes untrusted, unvalidated input directly into PorterStemmer.stem(), a non-default condition that requires a specific architectural decision by the application developer. Production NLP pipelines often do accept user-supplied text for stemming (search engines, text classifiers, chatbots), so the population of genuinely exposed services is real but not universal. EPSS data is not available in the provided intelligence, and the vulnerability is not listed in CISA KEV, meaning no confirmed active exploitation is on record. The attack payload is low-complexity to construct from the public description - a long string of 'y' characters plus a common English suffix - so the gap between theoretical and practical exploitability is small once an attacker identifies a vulnerable endpoint. Even a mid-sized IT team operating NLP-backed services should treat this as an urgent dependency update rather than a deferred maintenance item, given the trivial construction of the payload. No conflicting signals exist between available data sources; the primary uncertainty is whether a given deployment actually exposes the stemmer to user input. |
| Exploit ScenarioDerived | An attacker identifies a public-facing web service that accepts free-text input (e.g., a search field, a text analysis API) backed by NLTK's PorterStemmer for term normalization. The attacker submits a single HTTP request containing a token of approximately 30,000 'y' characters followed by the suffix 'ness', causing PorterStemmer.stem() to enter a quadratic computation loop that pins a CPU core for tens of seconds. By sending a low volume of such requests - potentially as few as one per worker thread - the attacker can render the service unresponsive without any authentication. No exploit code needs to be obtained; the attack string is fully derivable from the public CVE description. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 27, 2026
CPU-pinning denial of service in NLTK's PorterStemmer component (versions ≤ 3.10.2) allows a remote unauthenticated attacker to exhaust a CPU core for seconds to minutes by submitting a single crafted token. The root cause is quadratic algorithmic complexity: _is_consonant() re-walks trailing 'y' characters on every invocation, and _measure() calls it once per stem position, resulting in O(n²) processing time. Any service that passes untrusted text through PorterStemmer.stem() without input length validation is vulnerable; a ~20-50 KB payload of repeated 'y' characters followed by a matching suffix such as 'ness' is sufficient to trigger the condition. No public exploit code is identified at time of analysis, but the attack primitive is trivially constructable from the public description. Fix is available in NLTK 3.10.3.
RemediationAI
The primary fix is to upgrade NLTK to version 3.10.3 or later, which resolves the quadratic complexity in PorterStemmer per the vendor security advisory GHSA-ww6m-cw3f-q94g (https://github.com/nltk/nltk/security/advisories/GHSA-ww6m-cw3f-q94g). For environments that cannot immediately upgrade, the most effective compensating control is to enforce a maximum token length before any call to PorterStemmer.stem() - rejecting or truncating tokens above a safe threshold (e.g., 512 characters) eliminates the O(n²) blowup entirely, since legitimate English words are orders of magnitude shorter than the required attack payload. The trade-off of truncation is that extremely long tokens (URLs, technical identifiers) will be stemmed on a prefix only, which may produce incorrect stems in edge cases. Rate-limiting text-processing endpoints and validating that input is plausible natural language (charset, token count, individual token length) are additional layers but are not substitutes for patching. No configuration flag disables the vulnerable code path within NLTK itself - the fix must be applied either at the library level or as a pre-call guard.
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 for natural language processing. The PorterStemmer is an implementation of Martin Porter's 1980 English word-stemming algorithm, used to reduce words to their morphological root. CWE-407 (Insufficient Algorithmic Complexity) describes the root cause: the _is_consonant() helper performs a backward scan over each trailing run of 'y' characters each time it is called, and _measure() - which determines the 'measure' of a stem by counting consonant-vowel sequences - invokes _is_consonant() for every character position. For a token consisting almost entirely of 'y' characters (e.g., 'yyyy...yness'), this produces O(n²) work where n is token length. The CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* covers the full NLTK package up to and including 3.10.2. The attack surface is any code path that calls PorterStemmer.stem() on attacker-influenced input without first enforcing a maximum token length.
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:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Network-reachable via any exposing application, no authentication or interaction required; impact is pure availability with no confidentiality or integrity consequence.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
nltk PorterStemmer in versions <= 3.10.2 (fixed in 3.10.3) contains an inefficient-algorithmic-complexity denial of service in PorterStemmer.stem(). The _is_consonant() helper walks backward over the entire run of trailing 'y' characters on every call, and _measure() invokes it for each stem position, causing O(n^2) behavior. A single ~20-50 KB untrusted token consisting of a long run of the letter 'y' followed by a matching suffix (e.g., 'ness') can pin a CPU core for seconds to minutes, causing availability impact.
Blast Radius
ecosystem impact- 6,216 pypi packages depend on nltk (3,092 direct, 3,205 indirect)
Ecosystem-wide dependent count for version 3.10.3.
Executive ViewAI
A computational flaw in NLTK's text stemming component (versions ≤3.10.2) enables attackers to disable services through CPU exhaustion without authentication, affecting any organization using NLTK for search, chatbots, or language processing. A single malicious request can render services unresponsive for minutes, disrupting customer-facing operations and impacting availability SLAs. Teams running production search engines, recommendation systems, or NLP-powered applications should prioritize remediation to prevent incidents and service degradation.
Apply vendor patch: NLTK 3.10.3. For systems unable to patch immediately: enforce strict input length limits (reject tokens exceeding 1 KB), implement rate limiting on text processing endpoints, add timeout controls to stem() operations, and enable CPU monitoring and alerting on NLTK-processing services.
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-67072
GHSA-8x48-8g7j-rqxp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB