CVE-2026-0847
nltk: NLTK: Arbitrary file read via path traversal vulnerability
Overview
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness: CWE-22
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| PyPI | nltk | <3.9.3 | 3.9.3 |
Open a package to see all its vulnerabilities.
Operating systems · 11 fixes
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | nltk | affected |
| 12 | nltk | affected |
| 13 | nltk | affected |
| 14 | nltk | 3.9.3-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| nltk | affected |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | python311-nltk +1 | 3.9.3-1.1 | openSUSE-SU-2026:10304-1 |
ubuntu 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | nltk | 3.2.5-1ubuntu0.1+esm4 |
| 20.04-ESM | nltk | 3.4.5-2ubuntu0.1~esm4 |
| 22.04 | nltk | affected |
| 24.04 | nltk | affected |
| 26.04 | nltk | affected |
References
- access.redhat.com https://access.redhat.com/errata/RHSA-2026:10184
- access.redhat.com https://access.redhat.com/errata/RHSA-2026:19712
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-0847
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2444608
- github.com https://github.com/nltk/nltk
- github.com https://github.com/nltk/nltk/commit/603e34d25a2cad4612185ebfa6bc1c0dcfcfb2ab
- github.com https://github.com/nltk/nltk/pull/3479
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-98.yaml
- huntr.com https://huntr.com/bounties/fc69914f-36a9-4c18-8503-10013b39f96
- huntr.com https://huntr.com/bounties/fc69914f-36a9-4c18-8503-10013b39f966
Show all 14 references
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.