Description
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.
Published: 2026-07-04
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

NLTK for Python versions 3.9.3 and earlier provide five Stanford interface classes (StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser, and StanfordNeuralDependencyParser) that accept user‑controllable JAR paths. The classes invoke a java() helper which uses subprocess.Popen() without verifying the integrity of the supplied JAR, exposing weaknesses identified as CWE‑347 and CWE‑94. An attacker can supply a malicious JAR that executes with the privileges of the NLTK process, resulting in arbitrary code execution.

Affected Systems

The flaw affects all releases of the Python NLTK package up to and including 3.9.3, specifically the five Stanford interface classes mentioned above. The vulnerability resides in the open‑source nltk/nltk repository and can be triggered whenever those classes are instantiated with externally supplied JAR paths.

Risk and Exploitability

The CVSS score of 7.8 signals high severity, while the EPSS score of <1% indicates a very low likelihood of exploitation in the wild. The flaw is not catalogued in CISA’s KEV list. An attacker can exploit the vulnerability by providing a malicious JAR to any of the vulnerable classes. This can occur in local development, during data ingestion from untrusted sources, or in production code that loads external JAR files that are not authenticated. The likely attack vector is the execution of untrusted JAR code through the Stanford interfaces, enabling the attacker to run arbitrary code with the rights of the NLTK process.

Generated by OpenCVE AI on July 26, 2026 at 22:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade NLTK to a patched release that applies SHA256 verification to the affected classes
  • Limit JAR inputs to a trusted whitelist and implement integrity checks (e.g., SHA256 hash verification) before invoking java()
  • Remove or isolate usage of the vulnerable Stanford interface classes and replace them with safe alternatives in a sandboxed environment

Generated by OpenCVE AI on July 26, 2026 at 22:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 06 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 06 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-347
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

threat_severity

Important


Sat, 04 Jul 2026 04:30:00 +0000

Type Values Removed Values Added
First Time appeared Nltk
Nltk nltk/nltk
Vendors & Products Nltk
Nltk nltk/nltk

Sat, 04 Jul 2026 01:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Untrusted JAR Code Execution in Multiple Stanford Interface Classes in nltk/nltk
Weaknesses CWE-94
References
Metrics cvssV3_0

{'score': 7.8, 'vector': 'CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published:

Updated: 2026-07-06T18:33:11.411Z

Reserved: 2026-06-15T08:33:00.274Z

Link: CVE-2026-12252

cve-icon Vulnrichment

Updated: 2026-07-06T18:33:06.624Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-04T00:58:58Z

Links: CVE-2026-12252 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T22:15:05Z

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')