CVE-2026-0848: Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading
Last updated 6 May 2026
Other sources
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.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-0848?
CVE-2026-0848 has a high severity rating due to the potential for arbitrary code execution.
How do I fix CVE-2026-0848?
To fix CVE-2026-0848, update NLTK to a version later than 3.9.2 that addresses the vulnerability.
Which versions of NLTK are affected by CVE-2026-0848?
NLTK versions 3.9.2 and prior are affected by CVE-2026-0848.
What type of vulnerability is CVE-2026-0848?
CVE-2026-0848 is an arbitrary code execution vulnerability caused by improper input validation in the StanfordSegmenter module.
What can happen if CVE-2026-0848 is exploited?
If exploited, CVE-2026-0848 could allow an attacker to execute arbitrary code on a vulnerable system.