AI and data stack advisories

Severe, 6 weeks1498Projects326

1498 severe, 6 weeks · 326 projects

NLTKGHSA-h8wq-7xc4-p3qx

NLTK has Arbitrary File Read via Absolute Path Input in nltk.util.filestring()

NLTK

CVE-2026-0846 · Published Mar 9, 2026 · updated Jun 8, 2026

High8.6
Fix: upgrade to 3.9.3 or later
GitHub advisory

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

PackageAffectedFixed in
nltk
PyPI
< 3.9.33.9.3
Details and references

More NLTK advisories

All NLTK