Skip to content
OpenAdvisories
Critical · 10.0 Public exploit CVE-2026-0848 EUVD-2026-9875GHSA-v2w2-xcg6-53wjPYSEC-2026-99

Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading

Published Mar 5, 2026 · Updated Mar 6, 2026 · Assigned by @huntr_ai

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 products

VendorProductAffectedFixed
nltk nltk/nltk unspecified – ≤ latest —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 nltk 3.9.3-1 —
Debian 13 nltk No fix yet —
Debian 12 nltk No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 nltk No fix yet —
Ubuntu 25.10 nltk No fix yet —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 26.04 LTS nltk 3.9.2-1ubuntu0.1~esm2 —
Ubuntu Pro 24.04 LTS nltk 3.8.1-1ubuntu0.1~esm2 —
Ubuntu Pro 22.04 LTS nltk 3.7-1ubuntu0.1~esm2 —
Ubuntu Pro 20.04 LTS nltk 3.4.5-2ubuntu0.1~esm4 —
Ubuntu Pro 18.04 LTS nltk 3.2.5-1ubuntu0.1+esm4 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 3 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI nltk < 3.9.3 3.9.3 PYSEC-2026-99

References