Skip to content
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.

GitHub advisory

Affected versions

PackageAffectedFixed in
nltk
PyPI
< 3.9.33.9.3
Details and references

More NLTK advisories

All NLTK

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.