CVE-2026-12252
Received Received - Intake

Code Execution in NLTK via Untrusted JAR in Stanford Interfaces

Vulnerability report for CVE-2026-12252, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-04

Last updated on: 2026-07-04

Assigner: huntr.dev

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-04
Last Modified
2026-07-04
Generated
2026-07-04
AI Q&A
2026-07-04
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 5 associated CPEs
Vendor Product Version / Range
stanford stanford_postagger 3.9.3
stanford stanford_ner_tagger 3.9.3
stanford stanford_parser 3.9.3
stanford stanford_dependency_parser 3.9.3
stanford stanford_neural_dependency_parser 3.9.3

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

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 file paths and execute them using the java() function, which internally calls subprocess.Popen() without verifying the integrity of the JAR files.

Because there is no integrity verification, an attacker can supply a malicious JAR file that will be executed, leading to arbitrary code execution.

This vulnerability is similar to CVE-2026-0848, which was fixed for the StanfordSegmenter by adding SHA256 verification, but this fix was not applied to these five classes.

Impact Analysis

This vulnerability can lead to arbitrary code execution on the system running the vulnerable nltk classes if an attacker can supply a malicious JAR file.

Because the vulnerability allows execution of untrusted code with potentially high privileges, it can compromise confidentiality, integrity, and availability of the affected system.

The CVSS v3.0 base score of 7.8 reflects a high severity, indicating significant impact including possible data loss, system compromise, or denial of service.

Mitigation Strategies

To mitigate this vulnerability, avoid using untrusted JAR files with the affected Stanford interface classes in nltk versions 3.9.3 and earlier.

Since the fix applied to StanfordSegmenter (SHA256 verification of JAR files) was not applied to these classes, you should manually verify the integrity of any JAR files before use.

Alternatively, upgrade to a version of nltk where this vulnerability is fixed or apply similar integrity verification (e.g., SHA256 checksum) to the JAR files used by these classes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-12252. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart