Skip to main content

NLTK CVE-2026-126300

| EUVDEUVD-2026-125221 MEDIUM
Inefficient Algorithmic Complexity (CWE-407)
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Submit long double-quote run to span-tokenizing endpoint
  2. Exploit
    Payload reaches quote-restore branch unchanged
  3. Execution
    Trigger O(n²) matched.pop(0) loop
  4. Impact
    Saturate one CPU core, degrade availability

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires that a network-reachable component pass attacker-controlled untrusted text to TreebankWordTokenizer.span_tokenize (exported from nltk.tokenize) - typical in offset, annotation, or highlighting pipelines. The payload must contain a long run of double-quote characters to enter the quote-restoration branch (branch selector matches '"' in text), which NLTK versions 3.2.5 through before 3.10.4 process with an unguarded O(n^2) list.pop(0) loop and no input-length cap. No authentication, special configuration, or user interaction is required (CVSS PR:N/UI:N/AC:L). Limiting factors: the vulnerable API must actually be exposed to attacker-supplied text (not all NLTK deployments span-tokenize untrusted input); impact is bounded to single-core CPU exhaustion and latency/availability degradation rather than code execution or data loss; and worker-pool exhaustion under concurrency is inferred from measured per-request cost, not demonstrated against a live service.

Impact

This is a genuine but moderate-severity availability issue, not a high-urgency emergency. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms network-reachable, low-complexity, unauthenticated triggering with no user interaction, but the only impact metric set is VA:L (low availability) - VC:N and VI:N mean no confidentiality or integrity exposure. The scored 6.9 reflects easy reach combined with limited (single-CPU-core) impact rather than a system-wide outage. Exploitation status is best characterized as a public PoC reference existing (the GHSA advisory embeds runnable reproduction code with measured timings), but the input does not mark the PoC as 'Publicly available (confirmed)' as weaponized tooling, and there is no CISA KEV listing and no EPSS score supplied, so there is no evidence of active or widespread exploitation. The vuln.today decision label is 'this_month' (not act_now/emergency), consistent with a real-but-patchable DoS. The main signal tension is the patch state: top-level metadata and EUVD report a fix available in 3.10.4, while the embedded GitHub source snapshot dated 2026-09-28 states the fix was still on open pull requests and not yet released ('Fix status: not fixed'); given today's date (2026-11-13) the release likely shipped, but this should be verified against PyPI. Bottom line: prioritize patching for any service that span-tokenizes untrusted text, but this is a resource-exhaustion DoS of bounded blast radius, not a critical RCE.

Exploit ScenarioDerived

An attacker submits a long run of double-quote characters (e.g. '"' * 256000) to any network-reachable service that calls TreebankWordTokenizer.span_tokenize on attacker-supplied text - such as an offset, annotation, or highlighting pipeline. Because of the O(n^2) matched.pop(0) loop, a single such request saturates one CPU core (about 6.57 seconds for 256,000 characters, growing quadratically), and concurrent requests can exhaust a worker pool and degrade availability. A runnable proof-of-concept with timing measurements is included in the GHSA advisory, though the input does not mark it as a confirmed weaponized exploit; no authentication, special configuration, or user interaction is required (PR:N/UI:N).

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 13, 2026

Quadratic CPU consumption in NLTK's TreebankWordTokenizer.span_tokenize affects versions 3.2.5 through 3.10.3 and can let unauthenticated remote attackers tie up a CPU core by submitting long runs of double quotes to services that span-tokenize untrusted text. A public proof-of-concept reference exists, and the vendor has released 3.10.4; impact is limited to availability degradation rather than code execution or data compromise. No KEV listing or EPSS score was supplied.

RemediationAI

Vendor-released patch: upgrade to nltk 3.10.4 or later; the fix replaces the O(n) list.pop(0) consumption pattern with forward iteration in tokenize/treebank.py and tokenize/destructive.py, per the GHSA advisory at https://github.com/nltk/nltk/security/advisories/GHSA-ffr9-mgrr-wcvr. If immediate upgrade is not possible, cap request and input lengths at the application boundary before calling span_tokenize and avoid exposing span_tokenize to untrusted text; these are interim mitigations and do not remove the quadratic behavior for accepted inputs. The VulnCheck advisory is available at https://www.vulncheck.com/advisories/nltk-from-3.2.5-before-3.10.4-cpu-exhaustion-via-treebankwordtokenizer-span-tokenize.

Affected VersionsENISA

nltk 3.2.5 <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's TreebankWordTokenizer is a pure-Python tokenizer exported from nltk.tokenize. In the quote-restoration branch, span_tokenize builds a matched list with one entry per double-quote occurrence and then reconstructs quote tokens using matched.pop(0); because removing the first element of a Python list is O(n), an input of n quotes yields cumulative O(n^2) work. The flaw is an algorithmic complexity issue (CWE-407; the advisory also maps CWE-400) with no input-length cap in span_tokenize or the underlying tokenize, and the project's regex timeout backstop in nltk/redos.py does not cover the pure-Python pop(0) sink. The trigger is specifically a long run of double-quote characters that satisfies the branch selector, and the demonstrated effect is single-core CPU exhaustion and latency degradation, with worker-pool exhaustion under concurrency inferred rather than demonstrated against a live service.

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 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Remote, low-complexity, unauthenticated triggering with no user interaction; impact is limited single-core CPU exhaustion, so A:L and C:N/I:N.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

Lifecycle Timeline

2
Patch available
Nov 13, 2026 - 10:02 EUVD
CVE Published
Nov 13, 2026 - 09:36 cve.org
MEDIUM 6.9

DescriptionCVE.org

NLTK from 3.2.5 before 3.10.4 contains an algorithmic complexity vulnerability in TreebankWordTokenizer.span_tokenize that allows remote attackers to cause quadratic CPU consumption through repeated list.pop(0) calls. Attackers can submit long runs of double-quote characters to services span-tokenizing untrusted text, exhausting a CPU core and degrading availability.

Blast Radius

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

Ecosystem-wide dependent count for version 3.2.5.

Threat Intelligence Overview

EPSS Score
0.5%
Top 56% exploitable
Prevalence
High
NLTK is a widely deployed Python NLP library across ML and text-processing stacks
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

55
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +34
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-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

Vendor StatusVendor

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