NLTKGHSA-h8wq-7xc4-p3qx
NLTK has Arbitrary File Read via Absolute Path Input in nltk.util.filestring()
High8.6CVE-2026-0846 · Published Mar 9, 2026 · updated Jun 8, 2026
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.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| nltk PyPI | < 3.9.3 | 3.9.3 |
Details and references
- CVSS 3.0
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-36
- Also known as
- CVE-2026-0846, PYSEC-2026-97
More NLTK advisories
All NLTK| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Mar 19 | NLTK has a Downloader Path Traversal Vulnerability (AFO) - Arbitrary File Overwrite | High8.1 | No fix yet |
| Mar 19 | Unauthenticated remote shutdown in nltk.app.wordnet_app | High7.5 | 3.9.4 |
| Mar 18 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in nltk | Medium6.1 | 3.9.4 |
| Mar 18 | Natural Language Toolkit (NLTK) has unbounded recursion in JSONTaggedDecoder.decode_obj() may cause DoS | Medium | 3.9.4 |
| Mar 5 | NLTK: code execution | Critical10.0 | 3.9.3 |
| Mar 4 | NLTK has a Path Traversal issue | High8.6 | No fix yet |