Cloudanix VulnDB

CVE-2026-63312

High · 7.5

CVSS

7.5

EPSS

0.7%

Published

Aug 22, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A popular Python library for processing text lets attackers read any file on the computer when the program is tricked into opening certain files.

Exploit Available
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

  1. Locate an application or service using NLTK < 3.10.0 that exposes corpus loading via user-controlled input
  2. Supply a malicious fileid pointing to a sensitive local path (e.g., /etc/passwd or application credential files)
  3. Trigger StreamBackedCorpusView instantiation or iteration
  4. 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