CVE-2026-12252
JSON

7.8high

Untrusted JAR Code Execution in Multiple Stanford Interface Classes in nltk/nltk

Severity
7.8high CVSS:3.0 by @huntr_ai
Exploit likelihood
0.19% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-9r6g-266r-89x4PYSEC-2026-2085

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

Product or packageVersionsReported by
nltk nltk/nltkfrom unspecified up to latestCVE List
nltk (PyPI)before 3.9.4GitHub Advisory Database, PyPA Advisory Database
nltk nltkup to 3.9.3NVD

All scores

@huntr_ai7.8high CVSS:3.0CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub7.8high CVSS:3.0CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
PyPA Advisory Database7.8high CVSS:3.0CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-94

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

En las versiones 3.9.3 y anteriores de nltk/nltk, cinco clases de interfaz de Stanford (StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser y StanfordNeuralDependencyParser) son vulnerables a la ejecución de código JAR no confiable. Estas clases aceptan rutas JAR controlables por el usuario y las ejecutan a través de la función ’java()’, que invoca a ’subprocess.Popen()’ sin verificación de integridad. Esta vulnerabilidad es idéntica a CVE-2026-0848, que fue corregida para StanfordSegmenter mediante la adición de verificación SHA256. Sin embargo, la corrección no se aplicó a estas clases adicionales, dejándolas susceptibles a la ejecución de código arbitrario al cargar archivos JAR no confiables.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-12252 changed 2026-07-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-9r6g-266r-89x4 changed 2026-10-02CC-BY-4.0
NVDCVE-2026-12252 changed 2026-10-25Public domain
PyPA Advisory DatabasePYSEC-2026-2085 changed 2026-10-15CC-BY-4.0