CVE-2026-0848
nltk: NLTK: Arbitrary code execution via unvalidated Java Archive (JAR) file loading
Severity by source
Trivy's own label is CRITICAL. Rated critical by Red Hat. Rated lower by Ubuntu (medium).
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 and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| debian 11 | nltk | no fix listed |
| debian 12 | nltk | no fix listed |
| debian 13 | nltk | no fix listed |
| debian 14 | nltk | 3.9.3-1 |
| echo | nltk | no fix listed |
| rapidfort debian 12 | nltk | 0:3.9.3-1 |
| rapidfort debian 13 | nltk | 0:3.9.3-1 |
| ubuntu 18.04-ESM | nltk | 3.2.5-1ubuntu0.1+esm4 |
| ubuntu 20.04-ESM | nltk | 3.4.5-2ubuntu0.1~esm4 |
| ubuntu 22.04 | nltk | no fix listed |
| ubuntu 24.04 | nltk | no fix listed |
| ubuntu 26.04 | nltk | no fix listed |
Show all 13 entries from 13 sources
| Source | Package | Fixed in |
|---|---|---|
| debian 11 | nltk | no fix listed |
| debian 12 | nltk | no fix listed |
| debian 13 | nltk | no fix listed |
| debian 14 | nltk | 3.9.3-1 |
| echo | nltk | no fix listed |
| rapidfort debian 12 | nltk | 0:3.9.3-1 |
| rapidfort debian 13 | nltk | 0:3.9.3-1 |
| ubuntu 18.04-ESM | nltk | 3.2.5-1ubuntu0.1+esm4 |
| ubuntu 20.04-ESM | nltk | 3.4.5-2ubuntu0.1~esm4 |
| ubuntu 22.04 | nltk | no fix listed |
| ubuntu 24.04 | nltk | no fix listed |
| ubuntu 26.04 | nltk | no fix listed |
| ubuntu 26.10 | nltk | no fix listed |
References
- https://access.redhat.com/security/cve/CVE-2026-0848
- https://github.com/nltk/nltk/commit/27fab63c5b7689a125feb282958f630ced3a4f77
- https://github.com/nltk/nltk/pull/3477
- https://huntr.com/bounties/08b109bb-ac24-403f-9422-1c246ce60202
- https://nvd.nist.gov/vuln/detail/CVE-2026-0848
- https://ubuntu.com/security/notices/USN-8302-1
- https://www.cve.org/CVERecord?id=CVE-2026-0848