Skip to main content

NLTK CVE-2026-80206

| EUVDEUVD-2026-66397 HIGH
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-08-26 VulnCheck GHSA-vf76-f5cp-9846 GHSA-w3v8-gmh9-3wv7 PYSEC-2026-3751
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Recon
    Identify externally exposed tgrep API endpoint
  2. Delivery
    Craft tgrep pattern with malicious /regex/ node
  3. Exploit
    Submit pattern to tgrep_positions() or tgrep_compile()
  4. Install
    _tgrep_node_action compiles and executes unvalidated regex
  5. C2
    Catastrophic backtracking saturates CPU
  6. Execute
    Python process blocked indefinitely
  7. Impact
    Service denial for all endpoint 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 application to pass attacker-controlled strings as the tgrep pattern argument to tgrep_positions() or tgrep_compile() - specifically, the attacker must control the pattern itself (not merely the tree being searched). The /regex/ node syntax must survive to the _tgrep_node_action function with a malicious payload intact. Deployments using NLTK tgrep exclusively with hardcoded or internally generated patterns are not exploitable regardless of network exposure. The CVSS 4.0 AT:P (attack requirement: present) and AC:H metrics formally capture this dependency on a non-default, explicitly exposed API configuration. Exploitation is limited to availability impact only - there is no code execution, data exfiltration, or integrity violation possible through this path. Authentication requirements are not confirmed from the available data; the PR:N CVSS metric implies no authentication is required once the tgrep API endpoint is reached.

Impact

The CVSS 4.0 score of 8.2 reflects High availability impact (VA:H) with zero confidentiality or integrity exposure. The vector AV:N/AC:H/AT:P confirms network reachability but flags two important mitigators: High attack complexity and a specific attack prerequisite requiring the tgrep API to be exposed to external, attacker-controlled input. EPSS data was not provided, limiting probabilistic exploitation assessment, and no CISA KEV listing exists. The absence of both KEV and public POC suggests this has not seen opportunistic or widespread exploitation. Real-world risk is highly deployment-dependent: organizations running web-facing NLP services that pass user input directly to tgrep functions face genuine denial-of-service risk, while the far more common offline batch-processing use of NLTK is not exploitable via this vector. The CVSS 4.0 score appropriately captures the High potential impact, but the AT:P requirement means security teams should audit their actual tgrep exposure before escalating priority - this is not a broad network-sweep risk.

Exploit ScenarioDerived

An attacker identifies a web API endpoint that accepts tgrep search patterns and passes them without sanitization to NLTK's tgrep_positions() function. The attacker submits a crafted tgrep pattern containing a /regex/ node with a polynomial backtracking expression (e.g., a nested quantifier pattern like /(a+)+$/) as the node label matcher. Python's re.search engine processes the pattern against each tree node label, entering catastrophic backtracking that saturates a CPU core and blocks the Python worker process, rendering the service unavailable to all concurrent users.

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

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

Alert me

AnalysisAIv1 – Aug 26, 2026

ReDoS in NLTK's tgrep module exposes applications to indefinite CPU saturation when user-controlled tgrep patterns containing /regex/ nodes reach the _tgrep_node_action function, which compiles and executes them via Python's re.search without validation or timeout. All NLTK versions before 3.10.3 are affected when tgrep_positions() or tgrep_compile() accept external input. No public exploit code or active exploitation (CISA KEV) has been identified at time of analysis; exploitation is conditional on a non-default, externally-exposed API configuration.

RemediationAI

Upgrade NLTK to version 3.10.3 or later, which addresses the unsafe regex handling in the tgrep module. The GitHub security advisory at https://github.com/nltk/nltk/security/advisories/GHSA-w3v8-gmh9-3wv7 provides authoritative fix details; the VulnCheck advisory at https://www.vulncheck.com/advisories/nltk-3.10.2-regular-expression-denial-of-service-via-tgrep provides additional context. If immediate upgrading is not feasible, apply one or more of these compensating controls: (1) Reject or strip /regex/ nodes from tgrep patterns at the application boundary before they reach NLTK - this eliminates the attack surface entirely but may break legitimate regex-based queries. (2) Run tgrep processing in a subprocess with a strict wall-clock timeout (e.g., Python's subprocess.run with timeout=N), isolating the Python process from indefinite blocking at the cost of added latency and process-management complexity. (3) Restrict tgrep pattern input to authenticated, trusted users only, reducing the exposed attack surface without eliminating it.

Affected VersionsENISA

nltk 0 <3.10.3

Affected Packages

pypi nltk fix: 3.10.3

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 computational linguistics and NLP. Its tgrep module implements tree-search grammar that allows querying parse tree structures. The _tgrep_node_action function handles /regex/ pattern nodes by extracting the embedded regex, compiling it with Python's re module, and executing re.search against tree node labels. CWE-1333 (Uncontrolled Regular Expression Complexity) describes the root cause: the library performs no sanitization, complexity bounding, or timeout enforcement on these user-supplied patterns, enabling catastrophic backtracking attacks. The affected CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* covers all NLTK versions prior to the 3.10.3 fix. The Python re engine is vulnerable to polynomial and exponential backtracking on pathological inputs, making it an unsuitable executor of untrusted regex without external safeguards.

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

Vendor (VulnCheck) PRIMARY 8.2 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

Network vector applies when tgrep API is exposed; AC:H captures the non-default exposed-input prerequisite; PR:N because no authentication is implied; A:H for indefinite CPU saturation; no C or I impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 5.9 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 26, 2026 - 12:02 EUVD
CVE Published
Aug 26, 2026 - 10:28 cve.org
HIGH 8.2

DescriptionCVE.org

NLTK before 3.10.3 contains a regular expression denial of service (ReDoS) vulnerability in the tgrep module. The _tgrep_node_action function compiles user-supplied regular expressions embedded in /regex/ pattern nodes and executes them via re.search against tree node labels without any validation or timeout. An attacker who controls the tgrep pattern (e.g., via tgrep_positions() or tgrep_compile() exposed to external input) can supply a pattern that triggers catastrophic backtracking, causing indefinite CPU saturation that blocks the Python process.

Blast Radius

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

Ecosystem-wide dependent count for version 3.10.3.

Executive ViewAI

Why It Matters

NLTK versions before 3.10.3 contain a regular expression denial-of-service (ReDoS) vulnerability in the tgrep module (CVSS 8.2) that allows attackers to saturate CPU resources through malicious regex patterns. Organizations using NLTK should assess whether tgrep APIs are exposed to external or untrusted input, as successful exploitation would cause application unavailability and operational disruption.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: strict input validation with maximum pattern length enforcement, CPU-execution timeouts on regex compilation and matching operations, network isolation or disabling of externally-accessible tgrep APIs if not operationally required, and real-time CPU utilization monitoring on systems accepting user-supplied tgrep input.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Medium
popular Python NLP library, widely used in research, academia, and NLP pipelines
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA Vendor 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 Yes
EPSS 0.2%
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
No
Human Impact
High
Technical Impact
Partial

Priority Score

61
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: +20
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 Nltk

View all
CVE-2026-79657 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p

CVE-2026-78683 CRITICAL POC
9.4 Aug 25

Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic

CVE-2025-14009 HIGH POC
8.8 Feb 18

Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow

CVE-2026-63312 HIGH POC
8.7 Aug 22

StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc

CVE-2026-62384 HIGH POC
8.7 Aug 22

Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to

CVE-2026-66393 HIGH POC
8.7 Aug 22

Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers

CVE-2026-62388 HIGH POC
8.7 Aug 22

Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse

CVE-2026-78681 HIGH POC
8.7 Aug 25

XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s

CVE-2026-78682 HIGH POC
8.7 Aug 25

Server-side request forgery in NLTK before 3.10.3 allows unauthenticated remote attackers to reach internal HTTP service

CVE-2026-70626 HIGH POC
8.6 Aug 22

Symlink escape in NLTK's CorpusReader.open() allows local attackers to read arbitrary files outside the designated corpu

CVE-2026-62385 HIGH POC
8.2 Aug 22

Path traversal in NLTK's FramenetCorpusReader and NKJPCorpusReader (all versions before 3.10.0) enables unauthenticated

CVE-2021-43854 HIGH POC
7.5 Dec 23

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research a

Vendor StatusVendor

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