Improper input validation in Nltk
CVE-2026-0848
NLTK versions <=3.9.2 are vulnerable to arbitrary code execution due to improper input validation in the StanfordSegmenter module. The module dynamically loads external Java .jar files without verification or sandboxing. An attacker can supply or replace the JAR file, enabling the execution of arbitrary Java bytecode at import time. This vulnerability can be exploited through methods such as model poisoning, MITM attacks, or dependency poisoning, leading to remote code execution. The issue arises from the direct execution of the JAR file via subprocess with unvalidated classpath input, allowing malicious classes to execute when loaded by the JVM.
Vulnerability class: Drupalgeddon 2 (CVE-2018-7600)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 10.0 (Critical). Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.008, 58.5th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Nltk
- Nltk Nltk/nltk — versions unspecified
Weakness classification (CWE)
Public exploits and proof-of-concept code
3 public repositories with exploit or proof-of-concept code for this CVE:
- fevar54/CVE-2026-0848-Scanner---Herramienta-de-Detecci-n (last pushed 2026-03-31): Scanner de CVE-2026-0848: detecta instalaciones de NLTK 3.9.2 o inferiores vulnerables. Reportes JSON/HTML/CSV.
- fevar54/CVE-2026-0848-PoC-Improper-Input-Validation (last pushed 2026-03-31): PoC de CVE-2026-0848: validacion de entrada indebida en NLTK que permite ejecucion de codigo via StanfordSegmenter.
- HyperPS/CVE-2026-0848 (last pushed 2026-03-29): nltk.tokenize.StanfordSegmenter dynamically loads external Java .jar files without verification or sandboxing. If an attacker can supply or replace the JAR (e.g., a poisoned model download, MITM pack…
References
- huntr.com/bounties/08b109bb-ac24-403f-9422-1c246ce60202 (Exploit, Vendor Advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.