All vulnerabilities

PyPI

CVE-2026-128137

NLTK corpus-reader view methods bypass the scoped root sandbox via intermediate-directory symlinks

Severity
Medium 5.5
Published
19 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.10.4
Exploit chance
0.2% in the next 30 daysHigher than 4% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Link following (CWE-59)
Attack
Needs local access · Needs a user account · No user action needed
Attacker can
Read data
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Also known as
GHSA-g58v-j9g9-5gfg
Sources
OSV.dev and GitHub

Description

affected: PyPI nltk >= 3.9.4 — CorpusReader.abspaths()/abspath() and the PlaintextCorpusReader / SyntaxCorpusReader view methods dynamically reproduced: nltk 3.9.4 (8/9, scoped-escape checks), 3.10.3 (wheel, 9/9 checks) and master 6818767b9 (9/9 checks)

_Source references (file:line) are to commit 303f6e2b (release tag v3.10.3). Line numbers in the released nltk wheel match this tag exactly; master 6818767b9 contains the same code (pathsec.py renumbered by +44 lines from added hardening comments). In 3.9.4 the same logic exists at earlier line numbers (api.py:222-236 for open(), api.py:161-203 for abspath()/abspaths(), data.py:382-388 for the pointer open, pathsec.py:105-114 for the scoped branch); the affected code is identical._

CorpusReader.open() (nltk/corpus/reader/api.py:235-257) is NLTK's hardened file-access entry point: after a lexical guard it calls validate_path(..., required_root=self._root) (api.py:246-249), and the scoped branch of pathsec.validate_path…

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
nltkPyPI · osv:PyPI:nltk
  • From 3.9.4 before 3.10.4

About nltk

Weekly downloads (PyPI)
11,948,568PyPI Stats, 23 Nov 2026

References