Gptline: NLTK: FileSystemPathPointer.open() sandbox check is dead code — arbitrary file read via file:// protocol (CVE-2026-65915)
Description
A logic bug in the NLTK library's FileSystemPathPointer.open() method disables a sandbox check intended to restrict file access. This flaw allows arbitrary file reads via file:// URLs passed to nltk.data.load(), enabling access to any file readable by the process user. The vulnerability affects NLTK versions prior to 3.10.0 and certain gptline versions. A patch is available that enforces directory whitelisting to prevent unauthorized file access.
CVSS v3.1
Score 6.5medium
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 (CVE-2026-65915) arises from a dead code sandbox check in nltk/data.py's FileSystemPathPointer.open() method. The check compares a normalized path against itself, which is always true, so the intended ValueError to block absolute file access never triggers. Since the path is already absolute-normalized during initialization, the check is ineffective. Consequently, any file accessible to the process can be read by passing a file:// URL to nltk.data.load() or nltk.data.find(). The recommended fix replaces the faulty check with a validation against a whitelist of allowed data directories using os.path.commonpath to ensure the requested file path is within permitted locations.
Potential Impact
Applications that allow user input to influence the argument to nltk.data.load() or nltk.data.find() are vulnerable to arbitrary file read attacks. An attacker can read sensitive files such as /etc/passwd, environment files, private keys, or credentials accessible to the process user. This can lead to information disclosure but does not allow code execution or data modification. The CVSS v3.1 score is 6.5 (medium severity) reflecting network attack vector, low complexity, low privileges required, no user interaction, and high confidentiality impact.
Mitigation Recommendations
A patch is available that corrects the sandbox check in FileSystemPathPointer.open() by validating file paths against an allowed list of nltk data directories. Users should update to a fixed version (>=3.10.0 for NLTK) or apply the patch to ensure the sandbox check properly restricts file access. Until patched, avoid passing untrusted input to nltk.data.load() or nltk.data.find().
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-79ph-w9m5-4v5m
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-65915"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a8a27f9acd9273b499bc9cc
Added to database: 08/22/2026, 22:51:37 UTC
Last enriched: 09/18/2026, 02:17:27 UTC
Last updated: 10/06/2026, 18:48:24 UTC
Views: 83
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.