CVE-2026-63312
High · 7.5CVSS
7.5
EPSS
0.7%
Published
Aug 22, 2026
CISA due date
—
Cloudanix analysis
A popular Python library for processing text lets attackers read any file on the computer when the program is tricked into opening certain files.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw allows arbitrary local file reads by invoking builtins.open() directly inside StreamBackedCorpusView instead of pathsec.open(), completely bypassing the ENFORCE path-security setting.
Why it matters to the business
Attackers can obtain sensitive system files and application credentials from any NLTK-dependent service, increasing the risk of credential theft, lateral movement, and data breaches in NLP pipelines.
How an attack unfolds
An attacker supplies a crafted fileid argument to StreamBackedCorpusView; because the code path uses the unrestricted builtins.open() call, the supplied path is resolved against the local filesystem regardless of ENFORCE rules, returning the file contents. Public exploit code is already available.
How to fix it
Upgrade NLTK to version 3.10.0 or later, which replaces the direct builtins.open() call with the pathsec.open() wrapper. Until the upgrade is complete, avoid exposing any NLTK corpus-loading functionality to untrusted input and run services under the least-privileged OS account.
How to confirm the fix worked
Confirm the installed NLTK version is 3.10.0 or newer; attempt to load a corpus with a fileid that would be blocked by ENFORCE and verify that access is now denied.
Typical attack path
- Locate an application or service using NLTK < 3.10.0 that exposes corpus loading via user-controlled input
- Supply a malicious fileid pointing to a sensitive local path (e.g., /etc/passwd or application credential files)
- Trigger StreamBackedCorpusView instantiation or iteration
- Receive or observe the contents of the target file in the response, logs, or error output
How to detect it
Review application and NLTK debug logs for StreamBackedCorpusView activity that references unexpected absolute paths or system directories; correlate with error messages or file-read events outside the expected corpus directories.
What your security team should do
- Immediately upgrade all NLTK installations to 3.10.0 or later
- Audit application code for any direct exposure of corpus fileids to user input
- Add runtime checks or sandboxing around NLTK corpus loading until patches are deployed
- Monitor dependency scanners for future NLTK updates
The record
NLTK before 3.10.0 contains an arbitrary local file read vulnerability in StreamBackedCorpusView that bypasses pathsec.ENFORCE by calling builtins.open() directly instead of pathsec.open(). Attackers who control the fileid argument can read arbitrary local files regardless of the ENFORCE setting, including sensitive system files and application credentials.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-108327 Tanium addressed a path traversal vulnerability in Tanium Data Service. CWE-22
- CVE-2026-121542 In Docker Buildx versions v0.19.0 through v0.38.0, an untrusted Bake definition may… CWE-22
- CVE-2026-63502 Yeti bridges the gap between CTI and DFIR practitioners by providing a Forensics… CWE-22
- CVE-2026-63478 isomorphic-git is a pure JavaScript implementation of Git for Node.js and browsers. CWE-22
- CVE-2026-63500 Yeti bridges the gap between CTI and DFIR practitioners by providing a Forensics… CWE-22
- CVE-2026-63395 isomorphic-git is a pure JavaScript implementation of Git for Node.js and browsers. CWE-22
- CVE-2026-63436 zt-zip is a Java library that provides convenience methods for ZIP archive manipulation. CWE-22
- CVE-2026-121263 A vulnerability was determined in phpMyAdmin MoTranslator up to 6.0.1. CWE-22