GitHub Advisoryadvisory · PyPI

GHSA-h8wq-7xc4-p3qx NLTK has Arbitrary File Read via Absolute Path Input in nltk.util.filestring()

HIGH Published 2026-03-09 Modified 2026-06-08 Official page ↗
Aliases
CVE-2026-0846
Ecosystem
PyPI
Packages
nltk
Severity
High
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
Weaknesses
CWE-36
Reviewed
2026-04-18

Affected packages

• PyPI nltk: < 3.9.3 → fixed in 3.9.3

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.

Related

Alias · CVE (1)

  • CVE-2026-0846 A vulnerability in the `filestring()` function of the `nltk.util` module in nltk version 3.9.2 allows arbitrary file read due to improper… vulnerability

Weakness · CWE (1)

  • CWE-36 Absolute Path Traversal weakness

References