CVE-2026-0846
nltk: NLTK: Arbitrary file read via improper path validation in `filestring()` function
Overview
Description
A vulnerability in the filestring() function of the nltk.util module in nltk version 3.9.2 allows arbitrary file read due to improper validation of input paths. The function directly opens files specified by user input without sanitization, enabling attackers to access sensitive system files by providing absolute paths or traversal paths. This vulnerability can be exploited locally or remotely, particularly in scenarios where the function is used in web APIs or other interfaces that accept user-supplied input.
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-36, 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 · 10 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 |
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-0846
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2445826
- github.com https://github.com/nltk/nltk
- github.com https://github.com/nltk/nltk/commit/1fc626969f013bba104a40e5e760b9d67b2994ea
- github.com https://github.com/nltk/nltk/commit/5c46f3dac7e0eb10ee7d9f7be9fe732b0ec0af25
- github.com https://github.com/nltk/nltk/commit/b2e1164bf89277f79b65406c829b99fb20ca1974
- github.com https://github.com/nltk/nltk/pull/3485
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-97.yaml
Show all 15 references
- huntr.com https://huntr.com/bounties/007b84f8-418e-4300-99d0-bf504c2f97eb
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-0846
- security.access.redhat.com https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-0846.json
- ubuntu.com https://ubuntu.com/security/notices/USN-8302-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2026-0846
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.