CVE-2026-0848

Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading

Published Mar 5, 2026 CVSS 3.1 · 10.0 Critical EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8302-1 NLTK vulnerabilities
History
Type Values Removed Values Added
First Time appeared Nltk nltk
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
Vendors & Products Nltk nltk
Type Values Removed Values Added
Weaknesses CWE-829
References
Metrics cvssV3_1

{'score': 10.0, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Nltk
Nltk nltk/nltk
Vendors & Products Nltk
Nltk nltk/nltk
Type Values Removed Values Added
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.
Title Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading
Weaknesses CWE-20
References
Metrics cvssV3_0

{'score': 10, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Mar 6, 2026, 4:31 PM
Reserved
Jan 10, 2026, 11:59 PM
Status
Analyzed
Published
Mar 5, 2026, 9:16 PM
Modified
Jun 17, 2026, 10:11 AM
Severity
Public date
Mar 5, 2026, 8:48 PM