CVE-2026-0847 Details
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.
A path traversal vulnerability has been identified in NLTK versions through 3.9.2, specifically within multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes inadequately sanitize or validate file paths, allowing attackers to traverse directories and access sensitive files on the server. This vulnerability is particularly concerning in contexts where user-controlled file inputs are processed, such as machine learning APIs, chatbots, or natural language processing pipelines. Exploiting this issue could lead to unauthorized access to sensitive files like system files, SSH private keys, and API tokens, with the potential for escalating to remote code execution when combined with other vulnerabilities.
A suggested patch involves adding path validation to the CorpusReader.open() method. This includes blocking absolute paths, preventing path traversal, and ensuring that file accesses are sandboxed within the corpus root.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 4, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://access.redhat.com/errata/RHSA-2026:10184 | redhat-SADP | |
| https://access.redhat.com/errata/RHSA-2026:19712 | redhat-SADP | |
| https://access.redhat.com/security/cve/CVE-2026-0847 | redhat-SADP | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2444608 | redhat-SADP | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-0847.json | redhat-SADP | |
| https://huntr.com/bounties/fc69914f-36a9-4c18-8503-10013b39f966 | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | redhat-SADP |
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| nltk nltk | <= 3.9.2 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 15, 2026 | CVE Modified | redhat-SADP |
| Jun 30, 2026 | CVE Modified | redhat-SADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 28, 2026 | Initial Analysis | [email protected] |
| Mar 4, 2026 | New CVE Received | [email protected] |