Skip to content
OpenAdvisories
High · 8.6 Public exploit CVE-2026-0847 EUVD-2026-9475GHSA-68j8-pq59-fqgmPYSEC-2026-98

Path Traversal in nltk/nltk

Published Mar 4, 2026 · Updated Sep 16, 2026 · Assigned by @huntr_ai

Description

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.

Affected products

VendorProductAffectedFixed
nltk nltk/nltk unspecified – ≤ latest —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 nltk 3.9.3-1 —
Debian 13 nltk No fix yet —
Debian 12 nltk No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 nltk No fix yet —
Ubuntu 25.10 nltk No fix yet —
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 26.04 LTS nltk 3.9.2-1ubuntu0.1~esm2 —
Ubuntu Pro 24.04 LTS nltk 3.8.1-1ubuntu0.1~esm2 —
Ubuntu Pro 22.04 LTS nltk 3.7-1ubuntu0.1~esm2 —
Ubuntu Pro 20.04 LTS nltk 3.4.5-2ubuntu0.1~esm4 —
Ubuntu Pro 18.04 LTS nltk 3.2.5-1ubuntu0.1+esm4 —
Ubuntu Pro 16.04 LTS nltk 3.1-1ubuntu0.1+esm4 —
Ubuntu Pro 14.04 LTS nltk 2.0~b9-0ubuntu4.1~esm6 —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-nltk 3.9.3-1.1 openSUSE-SU-2026:10304-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

  • HyperPS/CVE-2026-0847 ★ 0 · Mar 29, 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 Brac…

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI nltk < 3.9.3 3.9.3 GHSA-68j8-pq59-fqgm

Advisories 1

References