Vulnerability · Published Mar 5, 2026 · Assigned by @huntr_ai
CVE-2026-0848Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading
Critical 10.0
In plain English
A critical-severity improper input validation in nltk/nltk from nltk. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 58% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | nltk | no fix listed | DEBIAN-CVE-2026-0848 |
| Debian:13 | nltk | no fix listed | DEBIAN-CVE-2026-0848 |
| Debian:14 | nltk | 3.9.3-1 | DEBIAN-CVE-2026-0848 |
| PyPI | nltk | 3.9.3 | PYSEC-2026-99 |
| Ubuntu:25.10 | nltk | no fix listed | UBUNTU-CVE-2026-0848 |
| Ubuntu:26.10 | nltk | no fix listed | UBUNTU-CVE-2026-0848 |
Affected products (as reported)
Weakness: CWE-20 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H