Skip to main content

NLTK EUVDEUVD-2026-130438

| CVE-2026-128138 CRITICAL
Command Injection (CWE-77)
2026-11-19 security-advisories@github.com GHSA-x8q7-6c7m-52gw
9.8
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Reach exposed java()/java_class argument
  2. Exploit
    Inject -jar or @argfile launcher token
  3. Execution
    Java launcher loads attacker JAR
  4. Impact
    Execute arbitrary bytecode as NLTK process user

Vulnerability Assessment

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

1 technique across 1 tactic: Execution

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

Exploitation Conditions

Requires an embedding application to expose attacker-controlled input into one of two specific developer-facing channels: the first token of nltk.internals.java(cmd=...) or the public java_class constructor argument of StanfordSegmenter (both place the token where the Java launcher treats it as a control argument). The attacker must additionally be able to reference a JAR or Java @argfile readable by the NLTK process. Only NLTK 3.10.3 is affected. Limiting factors: it is NOT exploitable by importing or using NLTK's default/pure-Python functionality - it needs the Java bridge plus non-default exposure of these argument channels to untrusted input and a readable attacker-staged JAR/argfile; the resulting bytecode runs only with the NLTK process's own privileges.

Impact

Signals conflict and must be weighed carefully. NVD rates this CVSS 9.8 critical with vector AV:N/AC:L/PR:N/UI:N (trivial remote unauthenticated RCE), and the vuln.today Decision label is act_now. However, the GHSA reporter explicitly suggests only 'Moderate' severity and states 'This is not a claim that importing NLTK alone is remotely exploitable' - exploitation requires an embedding application to expose attacker control over the nltk.internals.java() cmd argument or StanfordSegmenter.java_class, plus a JAR/@argfile readable by the process. This is therefore a genuinely serious code-execution bypass but one whose real-world reachability is conditional, not a drive-by remote RCE: the CVSS AV:N/AC:L/PR:N overstates it relative to the described preconditions - verify whether your application actually routes untrusted input into these developer-facing argument channels. There is no CISA KEV listing and no EPSS score in the supplied data, so there is no evidence of widespread or active exploitation; the act_now priority appears driven by the critical CVSS plus the availability of a trivial fix (upgrade to 3.10.4), not by confirmed in-the-wild activity. Net: high priority for anyone running NLTK 3.10.3 that feeds untrusted data into the Stanford Java bridge, but low practical risk for the majority who do not invoke the Java integration or who run other versions.

Exploit ScenarioDerived

An application embeds NLTK 3.10.3 and routes untrusted input into StanfordSegmenter(java_class=...) or nltk.internals.java(cmd=...). The attacker supplies a leading '-jar /path/evil.jar' or '@/path/argfile' launcher token; the Java launcher interprets it as a control argument and executes attacker-selected Java bytecode with the NLTK process's privileges, bypassing the 3.10.3 unsafe-JAR/classpath opt-in. The GHSA references an attached reproducer and a proof matrix reporting 3/3 external-JAR execution, but this is a public PoC reference and is not independently verified here as working exploit code.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.9% 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.3 ships a Java bridge whose 3.10.3 hardening validates Java launcher tokens in the per-call options list but appends the caller-supplied cmd sequence without checking that its first element is a main class, so a leading -jar or @argfile token reaches the launcher and runs attacker-selected Java bytecode with the NLTK process's privileges - without NLTK_ALLOW_UNSAFE_JARS or trusted_raw_options. Only 3.10.3 is affected; the fix is released as 3.10.4 (PR #3771, commit b36212795). Real-world reachability is conditional: the embedding application must feed untrusted input into the first token of nltk.internals.java(cmd=...) or StanfordSegmenter(java_class=...), and the attacker needs a JAR or argfile readable by the NLTK process, which is why the assessed vector is AC:H rather than the AC:L in the headline 9.8 score; the vulnerability is unauthenticated per the CVSS vector (PR:N) but is not reachable through NLTK's default pure-Python functionality. There is no CISA KEV entry and no confirmed in-the-wild exploitation, though the GHSA includes a researcher reproducer demonstrating external JAR execution 3/3 times on the official wheel; the advisory itself suggests Moderate severity subject to maintainer assessment of argument reachability.

RemediationAI

Upgrade to NLTK 3.10.4, the vendor-released patch that contains the fix merged via PR #3771 (commit b36212795): java() now raises ValueError before spawning when the first cmd token is empty, non-string, or a stripped launcher switch or @argfile, and rejects @argfile tokens in any position, with StanfordSegmenter.java_class hitting the same check. Where the upgrade cannot be applied immediately, note that NLTK_ALLOW_UNSAFE_JARS and NLTK_ALLOW_UNSAFE_CLASSPATH do not help - the bypass skips those opt-ins - so the actionable compensating control is at the integration layer: never place untrusted or caller-derived strings in the first element of nltk.internals.java(cmd=...) or in StanfordSegmenter(java_class=...), hardcode the main class (for example edu.stanford.nlp.ie.crf.CRFClassifier) and pass only validated -loadClassifier/-textFile-style program arguments after it, and reject any java_class or cmd value that starts with - or @ after stripping, including Unicode whitespace prefixes. The trade-off is loss of configurability for callers that legitimately selected alternate Java entry points via configuration, which must instead be enumerated in an allowlist maintained in application code. Running NLTK with least privilege limits the impact of any residual bypass, since the child JVM executes with the privileges of the NLTK process. Due to the act_now priority label and the availability of a fixed release, treat exposure of these argument channels to untrusted input as urgent to remediate.

Affected VersionsENISA

nltk 3.10.3, < 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

The Java launcher treats the first non-option token on its command line as the main class; tokens such as -jar, -cp, module switches, -XX:OnError=... or an @argfile change launcher behaviour instead of naming a class. NLTK's nltk.internals.java() previously built its command line as validated per-call options, then an optional -cp classpath, then the caller's cmd list verbatim, which is the root cause class described as CWE-77 (command injection) in the CVE record and as CWE-88 (improper neutralization of argument delimiters) in the upstream advisory. Because Java expands an @argfile wherever it appears, an argument-file reference can also be smuggled into a later position. The 3.10.3 remediation for the earlier GHSA-m4rf-3fr8-xwx3 issue only validated the options channel, leaving the cmd channel - and the higher-level StanfordSegmenter(java_class=...) constructor argument, which becomes the first cmd token at nltk/tokenize/stanford_segmenter.py - as an alternate path around the same JVM/JAR execution boundary. The fix in commit b36212795 rejects an empty, non-string, or whitespace-only first token, rejects a first token whose stripped form begins with - or @ (so whitespace-prefixed and Unicode-whitespace-prefixed launcher tokens cannot slip through), and rejects an @argfile token in any position, raising ValueError before subprocess.Popen is constructed. Legitimate invocations where the main class is followed by --prefixed program arguments (for example Stanford's -loadClassifier) remain valid.

Know when Python 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) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.1 HIGH

Exploitation needs an app to expose the java()/java_class channel to untrusted input plus a readable attacker JAR/argfile, so AC:H; successful launcher-token injection yields full code execution (C/I/A:H).

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 19:34 EUVD
CVE Published
Nov 19, 2026 - 18:18 cve.org
CRITICAL 9.8

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.3 until 3.10.4, the NLTK 3.10.3 JVM hardening validates Java launcher tokens in the options channel but appends the caller-controlled cmd sequence without requiring its first token to be a main class. Supplying -jar or an @argfile through nltk.internals.java or StanfordSegmenter.java_class can therefore execute attacker-selected Java bytecode without the unsafe-JAR opt-in. 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
  • 10 pypi packages depend on nltk (9 direct, 1 indirect)

Ecosystem-wide dependent count for version 3.10.3.

Technical POC Analysis

CWE-77 (advisory also cites CWE-88).

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 critical-severity flaw in NLTK 3.10.3 (CVSS 9.8) allows a caller-supplied Java command sequence to execute attacker-controlled bytecode when an application passes untrusted input into NLTK's Java bridge, affecting only deployments that rely on the Java-based features. Leadership should care because any service exposing NLTK's Java invocation path to external or user-controlled input could permit arbitrary code execution under the application's privileges, though default pure-Python use is not exposed.

Business Impact: High
Compensating Controls

Vendor-released patch: 3.10.4 (PR #3771, commit b36212795)

Threat Intelligence Overview

EPSS Score
0.9%
Top 39% exploitable
Prevalence
High
very popular Python NLP library, but only the single 3.10.3 release is affected
Threat Intel
1
1 source
Social Media
3
Sightings
Data Quality
3 sources
Confidence: Low
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL 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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Total

Priority Score

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

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

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