CVE-2026-12252
Untrusted JAR Code Execution in Multiple Stanford Interface Classes in nltk/nltk
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.
INFO
Published Date :
July 4, 2026, 2:16 a.m.
Last Modified :
July 8, 2026, 3:01 p.m.
Remotely Exploit :
No
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.0 | HIGH | [email protected] |
Solution
- Update NLTK to a patched version.
- Verify JAR loading integrity checks.
- Avoid loading untrusted JAR files.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-12252.
| URL | Resource |
|---|---|
| https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb | Exploit Third Party Advisory |
| https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb | Exploit Third Party Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-12252 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-12252
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-12252 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-12252 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Jul. 08, 2026
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* versions up to (including) 3.9.3 Added Reference Type huntr.dev: https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb Types: Exploit, Third Party Advisory Added Reference Type CISA-ADP: https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb Types: Exploit, Third Party Advisory -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jul. 06, 2026
Action Type Old Value New Value Added Reference https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb Added SSVC {'id': 'CVE-2026-12252', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'no'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-07-06T18:32:42.979501Z'} -
New CVE Received by [email protected]
Jul. 04, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'nltk', 'product': 'nltk/nltk', 'versions': [{'status': 'affected', 'version': 'unspecified', 'versionType': 'custom', 'lessThanOrEqual': 'latest'}]}] 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. Added CVSS V3 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Added CWE CWE-94 Added Reference https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb