Vulnerability · Published Jul 4, 2026 · Assigned by @huntr_ai
CVE-2026-12252Untrusted JAR Code Execution in Multiple Stanford Interface Classes in nltk/nltk
High 7.8
In plain English
A high-severity code injection in nltk/nltk from nltk. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | nltk | no fix listed | DEBIAN-CVE-2026-12252 |
| Debian:13 | nltk | no fix listed | DEBIAN-CVE-2026-12252 |
| Debian:14 | nltk | 3.10.3-1 | DEBIAN-CVE-2026-12252 |
| PyPI | nltk | 3.9.4 | PYSEC-2026-2085 |
| PyPI | nltk | 3.9.4 | GHSA-9r6g-266r-89x4 |
| Ubuntu:25.10 | nltk | no fix listed | UBUNTU-CVE-2026-12252 |
| Ubuntu:26.10 | nltk | no fix listed | UBUNTU-CVE-2026-12252 |
Affected products (as reported)
Weakness: CWE-94 · Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H