Untrusted JAR Code Execution in Multiple Stanford Interface Classes in nltk/nltk
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-12252
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 21:05 UTC · Revision 1
Source evidence
Untrusted JAR Code Execution in Multiple Stanford Interface Classes in nltk/nltk
core-osv · Original sourcePublished 4 Jul 2026, 00:58 UTC
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.
osv:CVE-2026-12252
Complete source record
{
"id": "ee65ee12f331f4308b4f895be2a3dbbfa4e14f3eb35189680fc9a6ffefdcae7a",
"url": "https://osv.dev/vulnerability/CVE-2026-12252",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Untrusted JAR Code Execution in Multiple Stanford Interface Classes in nltk/nltk",
"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 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.",
"evidence": "osv:CVE-2026-12252",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-12252",
"aliases": [
"CVE-2026-12252",
"GHSA-9r6g-266r-89x4",
"PYSEC-2026-2085"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/nltk/nltk",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"last_affected": "4154eb85e832f266660a09286c7e37e308292284"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"last_affected": "3.9.3"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"3.9.3",
"v3.9.2",
"3.9.2",
"3.9.1",
"3.9",
"3.8.2",
"3.8.1",
"3.8",
"3.7",
"3.6.7",
"3.6.6",
"3.6.5",
"3.6.2",
"3.6.1",
"3.6",
"3.5",
"3.5b1",
"3.4.4",
"3.4.3",
"3.4.1",
"3.4",
"3.3",
"3.2.5",
"3.2.4",
"3.2.3",
"3.2.2",
"3.2.1",
"3.2",
"3.1",
"3.0.5",
"3.0.4",
"3.0.3",
"3.0.2",
"3.0.0b1",
"3.0a4",
"2.0.1rc4",
"2.0.1rc3",
"2.0.1rc2",
"2.0.1rc1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-12252.json"
}
}
],
"modified": "2026-10-28T02:30:51.527924972Z",
"provider": "osv",
"references": [
"https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/12xxx/CVE-2026-12252.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-12252"
],
"provider_metadata": {
"cwe_ids": [
"CWE-94"
],
"cna_assigner": "@huntr_ai",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/12xxx/CVE-2026-12252.json"
}
},
"related_cves": [
{
"value": "CVE-2026-12252",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 520407,
"published_at": "2026-07-04T00:58:58.93+00:00"
}