Skip to content
NLTKGHSA-68j8-pq59-fqgm

NLTK has a Path Traversal issue

High8.6CVE-2026-0847 · Published Mar 4, 2026 · updated Jun 8, 2026

A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes fail to properly sanitize or validate file paths, enabling attackers to traverse directories and access sensitive files on the server. This issue is particularly critical in scenarios where user-controlled file inputs are processed, such as in machine learning APIs, chatbots, or NLP pipelines. Exploitation of this vulnerability can lead to unauthorized access to sensitive files, including system files, SSH private keys, and API tokens, and may potentially escalate to remote code execution when combined with other vulnerabilities.

GitHub advisory

Affected versions

PackageAffectedFixed in
nltk
PyPI
<= 3.9.2No fix yet
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-22
Also known as
CVE-2026-0847, PYSEC-2026-98

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.