Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify NLTK regex search endpoint
-
DeliveryCraft catastrophically backtracking regex pattern
-
ExploitSubmit pattern as user input to findall()
-
ExecutionPython re engine enters exponential backtracking
-
PersistGIL blocks all threads in process
-
ImpactApplication unavailable to all users
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity 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 target Python application to pass attacker-controlled strings as regex patterns directly to NLTK's Text.findall() or TokenSearcher.findall() methods without prior sanitization or timeout enforcement. Applications that build regex patterns internally from fixed templates, or that restrict user input to plain keyword strings before constructing patterns, are not exploitable. The CVSS 4.0 vector (PR:N/UI:N/AV:N) reflects deployment where these methods are reachable over a network without authentication - if an authentication layer gates access to the search endpoint, PR:L or PR:H would apply, materially reducing the attack surface. Exploitation is further limited by the GIL-serialized nature of CPython: the DoS affects only the targeted process instance, not other processes or the host OS. Multi-process application servers (e.g., gunicorn with multiple worker processes) limit blast radius to a single worker per attack request unless the attacker submits requests concurrently. |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N) reflects worst-case network-exposed deployment with no authentication barrier. Real-world risk is deployment-dependent: only applications that accept user-supplied regex strings and route them to NLTK's findall methods are exploitable. Applications that construct regex patterns internally from fixed templates are not affected. No EPSS data was provided in the input and no KEV listing exists, indicating no confirmed active exploitation at time of analysis. However, ReDoS is a trivially reproducible vulnerability class - any attacker who identifies an exposed NLTK findall endpoint can construct a proof-of-concept in minutes without specialized tooling. The availability-only impact (C:N/I:N/A:H) limits attacker objectives to disruption rather than data exfiltration, but the ability to continuously crash or freeze a shared Python process makes this a credible denial-of-service primitive. No conflicting signals were identified in the available data; the primary uncertainty is the fraction of NLTK deployments that expose user-supplied regex input. |
| Exploit ScenarioDerived | An attacker identifies a web application that accepts a search query and passes it as a regex to NLTK's Text.findall() - for example, a corpus search tool or NLP API. The attacker submits a payload such as the pattern (a+)+b against a long string of 'a' characters, causing the Python re engine to explore exponentially many backtracking paths. The single-threaded GIL ensures the stuck regex blocks all other requests, effectively bringing the application to a standstill until the process is restarted. No authentication is required if the search endpoint is publicly accessible. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 26, 2026
Catastrophic regex backtracking in NLTK before 3.10.0 allows unauthenticated remote attackers to saturate CPU and deny service to all users sharing the Python process by supplying crafted patterns to the Text.findall() or TokenSearcher.findall() methods. Any Python application that exposes NLTK regex search functionality to user-controlled input is affected across all platforms. No public exploit has been identified at time of analysis, but the vulnerability class (ReDoS) is well-understood and trivial to weaponize once the targeted endpoint is known.
RemediationAI
Upgrade NLTK to version 3.10.0 or later, which is the vendor-confirmed fix version per the GitHub security advisory at https://github.com/nltk/nltk/security/advisories/GHSA-rrv8-h7p8-rx55. The upgrade can be performed via pip install --upgrade nltk. If an immediate upgrade is not feasible, the primary compensating control is to validate or reject user-supplied regex patterns before passing them to NLTK: use the re module's re.error exception handling with a strict allowlist of safe pattern constructs, or substitute user-supplied patterns with a fixed internal pattern derived from sanitized input. A second option is to run findall calls in a separate subprocess with a wall-clock timeout (e.g., using concurrent.futures.ProcessPoolExecutor with a timeout argument), terminating the worker if it exceeds threshold - this adds latency overhead and process-spawn cost. Rate-limiting requests to NLTK search endpoints per IP or authenticated user reduces the blast radius but does not eliminate the vulnerability. Do not rely on thread-level timeouts; Python's GIL makes thread interruption of a running regex evaluation unreliable.
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 leading Python library for natural language processing, identified by CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*. The vulnerability is rooted in CWE-1333 (Inefficient Regular Expression Complexity), the canonical class covering ReDoS. Python's re module uses a backtracking NFA engine that has exponential worst-case complexity against certain ambiguous patterns - for example, patterns like (a+)+ against an input of repeated 'a' characters followed by a non-matching character. NLTK's Text.findall() and TokenSearcher.findall() accept caller-supplied regex strings and pass them directly to the re engine without sanitizing catastrophically backtracking constructs, imposing timeouts, or running the match in an isolated thread or process. Because Python's GIL serializes CPU execution within a process, a single long-running regex evaluation blocks all other threads, making a single malicious request sufficient to freeze the entire application.
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 vector with no auth or user interaction assumed for worst-case exposed endpoint; availability-only impact, no confidentiality or integrity effect.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK versions before 3.10.0 contain a regular expression denial of service vulnerability in Text.findall() and TokenSearcher.findall() methods that accept user-supplied regular expressions without validation or timeout. Attackers can supply crafted regex patterns that cause catastrophic backtracking, resulting in indefinite CPU saturation and denial of service to all users of the Python process.
Blast Radius
ecosystem impact- 6 pypi packages depend on nltk (6 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.10.0.
Executive ViewAI
NLTK (Natural Language Toolkit), a widely-used Python library for text processing, contains a denial-of-service vulnerability affecting versions before 3.10.0 that allows unauthenticated remote attackers to exhaust CPU resources and disrupt service. Any organization operating applications that expose NLTK's regex search methods to user input faces immediate risk of complete service outage for all users sharing the affected Python process.
No vendor-released patch identified at time of analysis. Interim mitigations: implement mandatory input validation and regex pattern sanitization before calling NLTK search methods; enforce strict request timeouts (fail fast on long-running operations); restrict user-facing regex search endpoints to authenticated and rate-limited access; isolate NLTK-dependent services in separate container/process namespaces to prevent CPU saturation from affecting other applications; disable regex search functionality where not essential to business operations.
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-66396
GHSA-2rrw-hpqm-36pv
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB