CVE-2026-0847
Path Traversal in NLTK CorpusReader Enables Arbitrary File Read
Publication date: 2026-03-04
Last updated on: 2026-04-28
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-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in NLTK versions up to and including 3.9.2 and involves multiple CorpusReader classes such as WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes do not properly sanitize or validate file paths, which allows an attacker to perform path traversal attacks. By exploiting this, an attacker can read arbitrary files on the server.
The vulnerability is especially critical when user-controlled file inputs are processed, for example in machine learning APIs, chatbots, or natural language processing pipelines.
How can this vulnerability impact me? :
Exploitation of this vulnerability can lead to unauthorized access to sensitive files on the server, including system files, SSH private keys, and API tokens.
Additionally, when combined with other vulnerabilities, it may allow an attacker to escalate privileges and achieve remote code execution.
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
What immediate steps should I take to mitigate this vulnerability?
I don't know