Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-0847: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in nltk nltk/nltk

0
High
VulnerabilityCVE-2026-0847cvecve-2026-0847cwe-22
Published: Wed Mar 04 2026 (03/04/2026, 18:25:30 UTC)
Source: CVE Database V5
Vendor/Project: nltk
Product: nltk/nltk

Description

A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes fail to properly sanitize or validate file paths, enabling attackers to traverse directories and access sensitive files on the server. This issue is particularly critical in scenarios where user-controlled file inputs are processed, such as in machine learning APIs, chatbots, or NLP pipelines. Exploitation of this vulnerability can lead to unauthorized access to sensitive files, including system files, SSH private keys, and API tokens, and may potentially escalate to remote code execution when combined with other vulnerabilities.

AI-Powered Analysis

AILast updated: 03/04/2026, 18:47:56 UTC

Technical Analysis

CVE-2026-0847 is a path traversal vulnerability classified under CWE-22 affecting the NLTK library, a widely used Python toolkit for natural language processing. The flaw exists in multiple CorpusReader classes—WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader—that do not adequately validate or sanitize file path inputs. This improper limitation allows an attacker to craft malicious file paths that traverse outside the intended directories, enabling arbitrary file reads on the host system. Since these classes are often used to load linguistic corpora, if user input is incorporated into file path parameters without proper validation, attackers can exploit this to access sensitive files such as system configuration files, private SSH keys, or API tokens stored on the server. The vulnerability is remotely exploitable without requiring authentication or user interaction, increasing its risk profile. While no public exploits have been observed, the high CVSS score of 8.6 reflects the critical confidentiality impact and the ease of exploitation. Additionally, if combined with other vulnerabilities, this arbitrary file read could facilitate remote code execution. The vulnerability affects all NLTK versions up to and including 3.9.2, with no patch links currently provided, indicating the need for urgent attention from maintainers and users.

Potential Impact

The primary impact of CVE-2026-0847 is unauthorized disclosure of sensitive information, which can severely compromise confidentiality. Attackers can read arbitrary files on the server, potentially exposing credentials, private keys, and configuration files that could be leveraged for further attacks such as privilege escalation or lateral movement. This can lead to data breaches, loss of intellectual property, and undermining of trust in affected applications. The vulnerability also poses a risk to availability and integrity if combined with other exploits enabling remote code execution. Organizations deploying NLP services, chatbots, or machine learning APIs that utilize vulnerable NLTK versions are at risk of compromise. The ease of remote exploitation without authentication or user interaction broadens the attack surface, making automated attacks feasible. The lack of known exploits in the wild currently limits immediate impact, but the potential for rapid weaponization remains high. Overall, this vulnerability threatens the security posture of organizations relying on NLTK for processing user-supplied data.

Mitigation Recommendations

To mitigate CVE-2026-0847, organizations should first upgrade to a patched version of NLTK once available. In the absence of an official patch, implement strict input validation and sanitization on all file path parameters passed to CorpusReader classes, ensuring that user input cannot influence directory traversal sequences such as '../'. Employ allowlisting of acceptable file paths or restrict file access to predefined directories using secure coding practices. Use operating system-level controls such as chroot jails or containerization to limit file system exposure. Monitor application logs for suspicious file access patterns indicative of traversal attempts. Additionally, isolate NLP processing environments from sensitive data stores and minimize the privileges of processes running NLTK to reduce impact if exploited. Conduct thorough code reviews and penetration testing focusing on file handling routines. Finally, maintain an incident response plan to quickly address any exploitation attempts.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
@huntr_ai
Date Reserved
2026-01-10T23:57:44.460Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 69a87af1d1a09e29cb563d89

Added to database: 3/4/2026, 6:33:21 PM

Last enriched: 3/4/2026, 6:47:56 PM

Last updated: 3/4/2026, 7:36:47 PM

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses