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 arbit
Critical10.0CVE-2026-0848 · Published Mar 5, 2026 · updated May 20, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| nltk PyPI | < 3.9.3 | 3.9.3 |
Details and references
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.
- CVSS 3.0
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- Severity from
- the CVSS score
- Also known as
- CVE-2026-0848
More NLTK advisories
All NLTK| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Mar 4 | NLTK has a Path Traversal issue CVE-2026-0847High8.6no fix yet | High8.6 | No fix yet |
| Mar 9 | NLTK has Arbitrary File Read via Absolute Path Input in nltk.util.filestring() CVE-2026-0846High8.6fixed in 3.9.3 | High8.6 | 3.9.3 |
| Mar 18 | Natural Language Toolkit (NLTK) has unbounded recursion in JSONTaggedDecoder.decode_obj() may cause DoS CVE-2026-66393Mediumfixed in 3.9.4 | Medium | 3.9.4 |
| Mar 18 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in nltk CVE-2026-33230Medium6.1fixed in 3.9.4 | Medium6.1 | 3.9.4 |
| Feb 18 | NLTK has a Zip Slip Vulnerability CVE-2025-14009Critical10.0fixed in 3.9.3 | Critical10.0 | 3.9.3 |
| Mar 19 | Unauthenticated remote shutdown in nltk.app.wordnet_app CVE-2026-33231High7.5fixed in 3.9.4 | High7.5 | 3.9.4 |