CVE-2026-12252
nltk: nltk: Arbitrary Code Execution via Untrusted JAR File Loading
Overview
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.
Source: OX vulnerability database
Severity
7.8 · HIGH
CVSS 3.0 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness: CWE-94
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| PyPI | nltk | <3.9.4 | 3.9.4 |
Open a package to see all its vulnerabilities.
Operating systems · 7 fixes
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | nltk | affected |
| 12 | nltk | affected |
| 13 | nltk | affected |
| 14 | nltk | 3.10.3-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| nltk | affected |
minimos 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| label-studio | 1.23.1-r0 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | python313-nltk +1 | 3.10.3-1.1 | openSUSE-SU-2026:11587-1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-12252
- github.com https://github.com/nltk/nltk
- github.com https://github.com/nltk/nltk/commit/006f4b83d430147b067b81e2cddd226d6fa405c8
- github.com https://github.com/nltk/nltk/commit/24777f0cb8c33ed2839d16e0f8169a3c312a6806
- github.com https://github.com/nltk/nltk/pull/3743
- github.com https://github.com/nltk/nltk/releases/tag/v3.10.3
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-2085.yaml
- huntr.com https://huntr.com/bounties/f5c93982-0cc9-4e2e-bb85-1b6ab29a2efb
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-12252
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2026-12252
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.