CVE-2026-0848
Arbitrary Code Execution in NLTK StanfordSegmenter via Unvalidated JAR
Publication date: 2026-03-05
Last updated on: 2026-04-21
Assigner: huntr.dev
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| nltk | nltk | to 3.9.2 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-20 | The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. |
Attack-Flow Graph
AI Powered Q&A
How can this vulnerability impact me? :
This vulnerability can have severe impacts as it allows an attacker to execute arbitrary code remotely on the affected system without any privileges or user interaction.
- Complete compromise of the system running the vulnerable NLTK version.
- Potential data theft, data corruption, or disruption of services.
- Attackers can use this to install malware, create backdoors, or pivot to other parts of the network.
Can you explain this vulnerability to me?
NLTK versions up to 3.9.2 have a vulnerability in the StanfordSegmenter module where it improperly validates input. This module dynamically loads external Java .jar files without verifying or sandboxing them. An attacker can supply or replace the JAR file, which allows them to execute arbitrary Java bytecode when the module is imported.
The vulnerability occurs because the JAR file is executed directly via a subprocess with unvalidated classpath input, enabling malicious classes to run within the Java Virtual Machine (JVM).
Exploitation methods include model poisoning, man-in-the-middle (MITM) attacks, or dependency poisoning, all of which can lead to remote code execution.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, you should upgrade NLTK to a version later than 3.9.2 where the issue is fixed.
Avoid using the StanfordSegmenter module with untrusted or external Java .jar files, as it dynamically loads these without verification or sandboxing.
Ensure that your environment does not allow attackers to supply or replace the JAR files used by the StanfordSegmenter module.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know