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.
PoC: CVE-2026-0848-Scanner---Herramienta-de-Detecci-n
Herramienta de detección para CVE-2026-0848 que escanea sistemas locales y remotos en busca de instalaciones vulnerables de NLTK ≤ 3.9.2. Realiza escaneo por SSH, detección en red, genera reportes JSON/HTML/CSV y calcula nivel de riesgo basado en presencia de modelos StanfordSegmenter comprometidos.
PoC: CVE-2026-0848-PoC-Improper-Input-Validation
Este PoC compila código Java malicioso en un JAR con bloque estático, lo carga mediante StanfordSegmenter de NLTK, y al ser cargado por el JVM ejecuta automáticamente el payload, creando el archivo /tmp/pwned_cve_2026_0848 como prueba tangible de ejecución de código arbitrario.
PoC: CVE-2026-0848
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 package swap, or dependency poisoning), arbitrary Java bytecode executes at import time.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Get alerted for CVEs like this
Register your stack and get notified within minutes when a matching CVE drops.
Start monitoring free