Skip to main content
← All vulnerabilities
CVE-2026-0848PYSEC-2026-99

Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.9.3
3 proofs of concept on GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • nltk nltk/nltk

    Version range not reported

  • nltkPyPI

    fixed in 3.9.3

References 4

huntr.com

GitHub · HyperPS/CVE-2026-0848

GitHub · fevar54/CVE-2026-0848-PoC-Improper-Input-Validation

GitHub · fevar54/CVE-2026-0848-Scanner---Herramienta-de-Detecci-n