Skip to main content

NLTK CVE-2026-12252

| EUVDEUVD-2026-41656 HIGH
Code Injection (CWE-94)
2026-07-04 @huntr_ai GHSA-9r6g-266r-89x4
7.8
CVSS 3.0 · Vendor: huntr_ai
View

Attack ChainAIDerived

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

  1. Access
    Gain influence over JAR/model path
  2. Delivery
    Plant malicious Stanford JAR
  3. Exploit
    Victim instantiates Stanford wrapper class
  4. Execution
    java() calls subprocess.Popen on JAR
  5. Persist
    Attacker Java code executes as user
  6. Impact
    Full host compromise

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the victim application use one of the five vulnerable NLTK Stanford wrapper classes (StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser, or StanfordNeuralDependencyParser) AND load a JAR from a path the attacker can control or overwrite - e.g. a user-supplied path argument, a downloaded model bundle, or a writable model directory. A functioning local Java runtime must be present since execution occurs via the java() helper invoking subprocess.Popen(). Limiting factors that reduce realistic risk: exploitation demands user interaction (UI:R) to trigger the load, requires local access to influence the JAR path (AV:L), and does not apply to deployments that never use the Stanford interfaces or that source JARs only from trusted read-only locations. There is no network-facing, unauthenticated exposure.

Impact

The CVSS 3.0 vector CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (7.8, High) characterizes this as a local, low-complexity issue that requires user interaction and yields full confidentiality, integrity, and availability impact - consistent with a supply-chain/trojaned-artifact class of bug rather than a remotely reachable service flaw. Although PR:N nominally means no privileges, exploitation is gated by UI:R: a victim must actively load an attacker-supplied or attacker-modified JAR path, so real-world risk depends on how JAR/model paths are sourced in a given deployment. No EPSS score, KEV listing, or SSVC decision data was provided, and no public exploit is identified at time of analysis, so this should be treated as a high-severity-but-conditional issue rather than a mass-exploitation emergency. The strongest signal here is the confirmed root cause and the fact that it is a known-regression of a previously patched CVE, which raises confidence that the flaw is genuine even absent independent exploitation telemetry.

Exploit ScenarioDerived

An attacker who can influence the JAR/model path used by an application - for example by tricking a data scientist into downloading a 'Stanford model bundle' or by writing to a world-writable model directory - plants a malicious JAR. When the victim runs code that constructs StanfordNERTagger (or one of the other four classes) pointing at that JAR, NLTK launches it via subprocess.Popen() and the attacker's Java code executes with the victim's privileges. No public proof-of-concept is identified at time of analysis, but the attack is straightforward given the low complexity (AC:L) and the single required user action (UI:R).

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

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

Alert me

AnalysisAIv1 – Jul 04, 2026

Arbitrary code execution in the NLTK Python library (nltk/nltk 3.9.3 and earlier) allows an attacker to run untrusted Java code when a victim loads a malicious JAR through five Stanford interface wrappers (StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser, StanfordNeuralDependencyParser). These classes pass a user-controllable JAR path to an internal java() helper that calls subprocess.Popen() with no SHA256 integrity check, so a substituted or poisoned JAR executes with the user's privileges. This is a regression of CVE-2026-0848, whose SHA256 verification fix was applied only to StanfordSegmenter and never propagated to these five classes; no public exploit is identified at time of analysis, though a huntr bounty report exists.

RemediationAI

Upgrade to a fixed NLTK release once published; the provided data does not include an exact patched version number, so this is best described as: no vendor-released fixed version is independently confirmed at time of analysis - track the huntr report (https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb) and the nltk/nltk project for a release that extends the CVE-2026-0848 SHA256 verification to these five classes. As a compensating control, avoid loading Stanford JAR/model files from any path that is user-supplied, world-writable, or downloaded at runtime; pin JARs to a read-only, integrity-checked directory and verify their SHA256 hashes out-of-band before use (trade-off: manual hash management and breakage if legitimate JARs are updated). Where feasible, migrate off the deprecated Stanford interface classes to the maintained CoreNLP server-based API or equivalent, which changes integration effort but removes the local-JAR-execution path entirely; at minimum restrict filesystem permissions on the model directory so only trusted administrators can place JARs.

Affected VersionsENISA

nltk/nltk unspecified ≤latest

Affected Packages

pypi nltk fix: 3.9.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 (Natural Language Toolkit) is a widely used Python library for natural language processing that provides thin Python wrappers around external Java tools from the Stanford NLP suite (POS tagging, NER, constituency and dependency parsing). The affected classes shell out to the Java runtime by constructing a command that references a model/JAR path and executing it through the shared java() function, which ultimately invokes subprocess.Popen(). The root cause is CWE-94 (Improper Control of Generation of Code / code injection): because the JAR path is attacker-influenceable and the code launches whatever JAR it is pointed at without verifying its SHA256 hash, malicious bytecode is executed by the JVM. The companion fix for CVE-2026-0848 established that JAR integrity verification is the intended control, making the absence of that check in these five classes the specific defect. The CPE cpe:2.3:a:nltk:nltk/nltk:*:*:*:*:*:*:*:* covers all versions up to and including 3.9.3.

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

Local JAR-path control with a required victim action to load it (AV:L/UI:R); resulting Java code runs as the user, giving full C/I/A impact.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 7.8 HIGH

Primary rating from Vendor (huntr_ai).

CVSS VectorVendor: huntr_ai

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

DescriptionCVE.org

In nltk/nltk versions 3.9.3 and earlier, five Stanford interface classes (StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser, and StanfordNeuralDependencyParser) are vulnerable to untrusted JAR code execution. These classes accept user-controllable JAR paths and execute them via the java() function, which invokes subprocess.Popen() without integrity verification. This vulnerability is identical to CVE-2026-0848, which was fixed for StanfordSegmenter by adding SHA256 verification. However, the fix was not applied to these additional classes, leaving them susceptible to arbitrary code execution when loading untrusted JAR files.

Blast Radius

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

Ecosystem-wide dependent count for version 3.9.4.

Executive ViewAI

Why It Matters

NLTK (Natural Language Toolkit) versions 3.9.3 and earlier contain an arbitrary code execution vulnerability in Stanford interface wrappers that allows code execution when users load attacker-controlled JAR files. Although no public exploit has been identified, organizations using NLTK for NLP workloads face potential compromise of data science infrastructure and sensitive datasets.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict JAR file paths to a hardened, read-only directory with file integrity monitoring; (2) Disable Stanford wrapper imports if not required for core NLP operations; (3) Run NLTK processing in isolated containers with minimal host privileges; (4) Implement application allowlisting for Java subprocess execution from Python; (5) Enable comprehensive logging of subprocess calls and JAR file access patterns from NLTK processes.

Threat Intelligence Overview

EPSS Score
0.1%
Top 95% exploitable
Prevalence
High
NLTK is a very widely deployed Python NLP library, though these Stanford classes are legacy
Threat Intel
1
1 sources
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL 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.1%
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
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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

SUSE

Severity: Important
Product Status
openSUSE Tumbleweed Fixed

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