Skip to main content

NLTK CVE-2026-129229

| EUVDEUVD-2026-130427 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-11-19 GitHub_M GHSA-32p6-cwhc-8r78
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Locate NLTK endpoint using user-supplied regex pattern
  2. Delivery
    Submit ~50KB many-empty-group pattern
  3. Exploit
    Pattern reaches regex-engine compile sink
  4. Execution
    Quadratic compilation runs before match timeout
  5. Persist
    One request pins a CPU core
  6. Impact
    Concurrent requests exhaust all cores, deny 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

The application must pass caller/attacker-controlled text as the regular-expression PATTERN argument into one of the NLTK sinks: TokenSearcher.findall()/Text.findall() (3.10.0-3.10.3), RegexpTokenizer, or nltk.redos.compile (introduced 3.10.3). The crafted pattern is many empty capturing groups (e.g. '()' * N); it contains no whitespace, '<', '>', or '.', so it survives TokenSearcher.findall's preprocessing rewrites unchanged. Per PR:N/UI:N no authentication or user interaction is needed at the NLTK layer. Key limiting factors defenders can rely on: the untrusted input must be the pattern itself, not the searched corpus (uncommon in typical integrations); only versions 3.10.0 through 3.10.3 are affected; and NLTK's existing timeout is a match-time guard that does not apply, so the only complete fix is upgrading to 3.10.4.

Impact

CVSS 3.1 scores this 7.5 (HIGH) with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - availability-only impact, no confidentiality or integrity. The signals are internally consistent for a denial-of-service issue: network-reachable, low complexity, no privileges, no user interaction, A:H. The vuln.today priority is this_week, not act_now or emergency. No EPSS score was provided and the CVE is not in CISA KEV, so there is no evidence of active exploitation; a public proof-of-concept with timing measurements is published inside the GHSA-32p6-cwhc-8r78 advisory itself, but PoC availability is distinct from exploitation. The decisive real-world caveat the raw 7.5 hides: exploitation requires the integrating application to pass attacker-controlled text as the regular-expression PATTERN argument (not merely as the corpus being searched). Most NLTK integrations feed untrusted input as the text to be searched or tokenized, not as the pattern, so the exposed surface is far narrower than AV:N/PR:N implies. Net: a genuine unauthenticated DoS where the pattern sink is exposed, but a high-CVSS/low-real-exposure issue for the typical integration. Patch, but scope which deployments actually route untrusted input into the pattern argument.

Exploit ScenarioDerived

An application builds a search or tokenization feature on Text.findall()/TokenSearcher.findall() or a RegexpTokenizer whose pattern string is taken from user input. An unauthenticated attacker submits a tiny (~50 KB) pattern of many empty capturing groups such as '()' repeated 25000 times; the third-party regex engine spends tens of seconds compiling it before any matching begins, and NLTK's match-time wall-clock timeout never fires because it does not cover compilation. A working proof-of-concept with measurements is published in the GHSA advisory; repeated or concurrent requests exhaust all CPU cores and deny service.

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

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

Alert me

AnalysisAIv1 – Nov 19, 2026

NLTK 3.10.0 through 3.10.3 can be driven into sustained CPU exhaustion by a remote unauthenticated attacker who controls the regular-expression pattern handed to TokenSearcher.findall/Text.findall, to RegexpTokenizer, or (from 3.10.3) to nltk.redos.compile. Because the adopted third-party regex engine compiles group-dense patterns at roughly quadratic cost - a ~50 KB string of repeated empty groups such as "()" * 25000 takes several seconds to tens of seconds - and NLTK's wall-clock timeout only governs matching, a single small request blocks a worker core and concurrent requests deny service (CVSS 3.1 7.5, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). A public proof-of-concept is documented in the GitHub advisory GHSA-32p6-cwhc-8r78; it is not confirmed as deployed exploit code, and no CISA KEV listing is present in the supplied data. The vendor fixed the issue in 3.10.4.

RemediationAI

Vendor-released patch: upgrade nltk to 3.10.4, the release that closes CVE-2026-129229, available from PyPI and tagged at https://github.com/nltk/nltk/releases/tag/v3.10.4 (fix committed in 002bcf714ef8cb8baf94436f4be73e5516914412 via https://github.com/nltk/nltk/pull/3895; advisory https://github.com/nltk/nltk/security/advisories/GHSA-32p6-cwhc-8r78). Every branch from 3.10.0 through 3.10.3 should move to 3.10.4, with 3.10.3 prioritised because its released nltk/redos.py has no pre-compile guard or length cap. The advisory is explicit that the existing match-time wall-clock timeout is not a mitigation - it provably does not fire during compilation - and that the development-tree pre-compile check does not bound group count, so upgrading is the only complete fix; no vendor-documented workaround is given. Defenders who cannot upgrade immediately must rely on the deployment-side limiting factor described in the advisory rather than on NLTK's timeout: ensure that no externally supplied string is used as the pattern argument to TokenSearcher.findall, Text.findall, RegexpTokenizer or nltk.redos.compile, hard-coding or allow-listing patterns instead, and restricting or rate-limiting any service endpoint that forwards user input into those sinks so a single request cannot pin a worker core for tens of seconds.

Affected VersionsENISA

nltk 3.10.0, < 3.10.4

Affected Packages

pypi nltk fix: 3.10.4

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 adopted the third-party regex engine for the caller-supplied-pattern search path in 3.10.0, as the remediation for an earlier match-time backtracking flaw (GHSA-rrv8-h7p8-rx55 / CVE-2026-80205). That fix wrapped corpus scanning in a wall-clock timeout, but pattern compilation happens first, synchronously, outside any timeout. The regex compiler's cost is approximately O(n^2) in the number of capturing groups, so a short attacker-supplied pattern composed of many empty groups makes compilation - not matching - the expensive step: regex.compile("()" * n) measured 0.35s / 1.17s / 2.61s / 4.77s for n = 5000 / 10000 / 15000 / 20000, while the standard library re compiled a same-length 20000-group pattern in 0.14s, isolating the cost to group count in the adopted engine. The flaw is CWE-400 (uncontrolled resource consumption), with the advisory also classifying it as CWE-1333 (inefficient regular expression complexity). On released 3.10.0-3.10.2 the sink calls regex.findall(pattern, corpus, timeout=...) directly; 3.10.3 added nltk/redos.py and routed RegexpTokenizer through nltk.redos.compile -> regex.compile(src, flags) with no pre-compile guard or length cap at all, making it the most exposed release. The development tree adds a check_pattern guard bounding source length, nesting depth and counted-repeat product, but it does not count groups (it accepts "()" * 49000), so the compile-time vector persists there. CPE coverage is nltk:nltk for versions from 3.10.0 up to and including 3.10.3; 3.9.4 and earlier used the standard library re at that sink and are not affected. Exploitation requires that untrusted text become the pattern itself rather than the corpus being searched, which the assessment flags as an uncommon integration pattern and a key limiting factor.

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 (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Network-reachable when the pattern sink is exposed, low complexity with a small crafted pattern, no privileges or interaction at the library layer, availability-only impact (CPU exhaustion), so C:N/I:N/A:H.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 19:34 EUVD
CVE Published
Nov 19, 2026 - 17:19 cve.org
HIGH 7.5

DescriptionCVE.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. From 3.10.0 until 3.10.4, TokenSearcher.findall and Text.findall accept caller-controlled regular expressions with an unbounded number of capturing groups throughout the affected range. Starting in 3.10.3, nltk.redos.compile and RegexpTokenizer expose the same compile-time vector. The third-party regex engine compiles group-dense patterns with roughly quadratic cost before the match-time timeout begins, allowing a small unauthenticated request to exhaust CPU and deny service. This issue is fixed in version 3.10.4.

Blast Radius

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

Ecosystem-wide dependent count for version 3.10.0.

Technical POC Analysis

CWE-400 (Uncontrolled Resource Consumption), also tagged CWE-1333.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity vulnerability in NLTK versions 3.10.0 through 3.10.3 allows a remote, unauthenticated attacker to cause sustained CPU exhaustion by submitting malicious regular expressions, leading to denial of service. Since NLTK is a widely used Python library for natural language processing, any internet-facing service using these versions is at risk of becoming unresponsive, disrupting operations and potentially affecting customers and revenue. Leadership should prioritize patching to maintain service availability and protect organizational reputation.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.7%
Top 46% exploitable
Prevalence
High
very widely installed Python NLP library, large PyPI footprint
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA 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 No
EPSS 0.7%
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
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: 0
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-126297 HIGH POC
8.7 Nov 13

CPU exhaustion in NLTK's ConllCorpusReader.srl_instances() lets an attacker who supplies a crafted CoNLL SRL corpus pin

CVE-2026-126298 HIGH POC
8.7 Nov 13

CPU exhaustion in NLTK's Tree.chomsky_normal_form() right-factor binarization affects NLTK through 3.10.3 and lets remot

CVE-2026-126299 HIGH POC
8.7 Nov 13

Quadratic CPU exhaustion in NLTK's CCG lexicon parser (nltk.ccg.lexicon.fromstring, also re-exported as nltk.ccg.chart.f

CVE-2026-126303 HIGH POC
8.7 Nov 13

Denial of service in NLTK before 3.10.4 allows remote attackers to pin a CPU core and exhaust bounded worker pools by ca

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

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