CVE-2026-0848: Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading

Published Mar 5, 2026
·
Updated

Last updated 6 May 2026

Other sources

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.

MITRE

Affected Software

3 affected componentsFixes available
pypi/nltk<=3.9.2
nltk nltk<=3.9.2
debian/nltk<=3.5-1, <=3.8-1, <=3.9.1-2
3.9.3-1

Event History

Mar 5, 2026
CVE Published
via MITRE·08:48 PM
Data Sourced
via MITRE·08:48 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeaknessAffected Software
May 25, 2026
Data Sourced
via Ubuntu·10:06 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Debian·10:08 PM
DescriptionAffected Software
Data Sourced
via Launchpad·10:08 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2026-0848?

CVE-2026-0848 has a high severity rating due to the potential for arbitrary code execution.

2

How do I fix CVE-2026-0848?

To fix CVE-2026-0848, update NLTK to a version later than 3.9.2 that addresses the vulnerability.

3

Which versions of NLTK are affected by CVE-2026-0848?

NLTK versions 3.9.2 and prior are affected by CVE-2026-0848.

4

What type of vulnerability is CVE-2026-0848?

CVE-2026-0848 is an arbitrary code execution vulnerability caused by improper input validation in the StanfordSegmenter module.

5

What can happen if CVE-2026-0848 is exploited?

If exploited, CVE-2026-0848 could allow an attacker to execute arbitrary code on a vulnerable system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203