Gptline: NLTK: Symlink escape in CorpusReader allows arbitrary local file read outside the corpus root (CVE-2026-70626)
Description
NLTK's CorpusReader.open() method allows reading arbitrary local files outside the intended corpus root directory via symlink traversal. Although it blocks absolute paths and '..' traversal lexically, it does not resolve symlinks before checking the file path, enabling a filesystem sandbox bypass. This vulnerability can disclose sensitive local files accessible to the application user.
CVSS v3.1
Score 6.2medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in nltk.corpus.reader.api.CorpusReader.open() arises because the method blocks absolute paths and '..' traversal lexically but does not resolve symbolic links before verifying that a requested file path remains within the configured corpus root. The check uses os.path.normpath on the joined path but does not account for symlinks that may point outside the root directory. An attacker placing a symlink inside the corpus root that points to an arbitrary file outside the root can cause the application to read files outside the intended sandbox. This leads to arbitrary local file read and filesystem sandbox escape for applications relying on CorpusReader or FileSystemPathPointer to restrict file access. The issue was demonstrated with a proof-of-concept that reads files such as /etc/hostname by symlink escape.
Potential Impact
This vulnerability allows an attacker who can place or influence files inside the allowed corpus root directory to read arbitrary local files outside that root, including application secrets, local configuration files, private datasets, and system files readable by the application user. It bypasses the intended filesystem sandbox restrictions, potentially exposing sensitive information. The impact is limited to local file disclosure; there is no indication of code execution or integrity impact.
Mitigation Recommendations
A patch is available for this vulnerability. Users should update to a fixed version of NLTK that properly resolves symlinks before enforcing path restrictions to prevent filesystem sandbox bypass. Until patched, applications should avoid processing untrusted corpus directories or files that may contain symlinks. No vendor advisory content contradicts this; thus, applying the official fix is recommended.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-8h9m-22mv-qv5r
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-70626"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a8a27f6acd9273b499bc947
Added to database: 08/22/2026, 22:51:34 UTC
Last enriched: 09/18/2026, 02:17:22 UTC
Last updated: 10/06/2026, 18:48:24 UTC
Views: 69
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.