Improper input validation in Nltk

CVE-2026-0848

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.

Vulnerability class: Drupalgeddon 2 (CVE-2018-7600)

Published · last modified .

CVSS v3 metric

CVSS v3 base score 10.0 (Critical). Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.

EPSS exploit prediction

EPSS 0.008, 58.5th percentile (scored ); unchanged over 30 days. About EPSS.

Affected products

Weakness classification (CWE)

Public exploits and proof-of-concept code

3 public repositories with exploit or proof-of-concept code for this CVE:

References