CVE-2026-70626
PoC massSymlink Escape in NLTK CorpusReader Allows Arbitrary Local File Read
CVE-2026-70626 is a symlink-following flaw (CWE-59) in the NLTK Python library: CorpusReader.open() and FileSystemPathPointer.join() enforce the corpus-root boundary only lexically via os.path.normpath() and never resolve symlinks. An attacker who can place or influence a symlink inside the corpus root can request a file ID such as link/secret.txt — containing no absolute path or '..' — that lexically stays under the root but resolves to an arbitrary file elsewhere on the filesystem. Successful abuse yields arbitrary local file reads with the privileges of the process running NLTK, bypassing the corpus-root restriction that applications may rely on as a security boundary. Impact is limited to deployments of the pip-installed nltk package that use CorpusReader or FileSystemPathPointer to restrict file access, and only where the attacker can plant symlinks under the corpus root, consistent with the CVSS 4.0 local attack vector (8.6 high). No in-the-wild exploitation or public PoC is currently known (EPSS 0.2%, percentile 11; not in CISA KEV).
What to do: No fixed version is specified in the available data, so track upstream NLTK releases and upgrade to the first patched release when it is published. Until then, prevent untrusted users from creating symlinks within corpus roots, treat CorpusReader.open()/FileSystemPathPointer.join() boundaries as advisory rather than a security control, and have applications resolve the final path (realpath) and confirm it remains under the root before opening. Audit any deployment that uses these APIs as a file-access sandbox for attacker-influenceable corpus directories.
| NLTK (Natural Language Toolkit project) nltk (Python/PyPI package) — nltk.corpus.reader.api.CorpusReader.open() and nltk.data.FileSystemPathPointer.join() | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
NLTK versions before 3.9.4 contain a symlink escape vulnerability in CorpusReader.open() that allows local attackers to read arbitrary files outside the corpus root. The vulnerability exists because path validation is lexical and does not account for symlink resolution, enabling attackers to place symlinks inside the corpus root to access files outside the intended boundary.
- Vendors
- nltk
- Products
- nltk
- Ecosystems
- pip
- Weakness
- CWE-59
- Vector
- CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- GHSA
- GHSA-r6gq-whwq-mvg9 (high)
In the news0 stories
No ingested article mentions this CVE yet.