NLTK nltk/nltk
Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= unspecified, <= latest
Mitigation
The record names no fix. Check the vendor advisory below.
Timeline
Days relative to CVE publicationFirst public PoC 26 days after publication; not in CISA KEV. First PoC: fevar54/CVE-2026-0848-PoC-Improper-Input-Validation (created 31 Mar 2026, found by us: backfilled).
PoC repositories
Found on GitHub.2 PoCs · 1 informational
PoCs 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| fevar54/CVE-2026-0848-PoC-Improper-Input-Validation | 31 Mar 2026 +26 d | 0 | PoC |
| fevar54/CVE-2026-0848-Scanner---Herramienta-de-Detecci-n | 31 Mar 2026 +26 d | 0 | Scanner |
Informational 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| HyperPS/CVE-2026-0848 | 29 Mar 2026 +23 d | 0 | Informational · write-up |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.