CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-79674

CVE-2026-79674: Path Sandbox Bypass in NLTK CorpusReader Constructors

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 8, 2026·6 min read·44 visits

Executive Summary (TL;DR)

NLTK versions prior to 3.10.3 fail to validate user-supplied corpus root paths against the internal pathsec sandbox during CorpusReader initialization. This oversight allows attackers to perform local directory listings and unauthorized reads on arbitrary files and SQLite databases.

A critical logical flaw in the Natural Language Toolkit (NLTK) allows attackers to bypass the application-level directory sandbox. This vulnerability enables unauthenticated directory enumeration and arbitrary local file or SQLite database access.

Vulnerability Overview

The Natural Language Toolkit (NLTK) is an industry-standard Python library used extensively for natural language processing, corpus management, and text analysis. In environments where untrusted parties can configure linguistic pipelines or supply corpus metadata, NLTK relies on an application-level path sandbox implementation (nltk.pathsec) to isolate local file access.

This security sandbox acts as a logical barrier, restricting corpus load and read operations strictly to authorized system paths, such as the predefined nltk_data directory. When security enforcement is globally enabled (pathsec.ENFORCE = True), any operational request targeting an out-of-bounds directory path should trigger an access-denied exception.

A systemic security gap was discovered in the way the base CorpusReader class and several specialized subclasses initialize geographic and semantic assets. Specifically, the base constructor processes user-supplied root path strings into directory pointer structures without applying validation rules against the active sandbox context. Consequently, this exposes sensitive local files to unauthorized access and analysis.

Root Cause Analysis

The root cause of this vulnerability lies in the lack of path validation inside CorpusReader.__init__ and subsequent direct usage of unvalidated paths in disk operations. When instantiating CorpusReader, the program accepts a raw root string parameter representing the filesystem location of the linguistic dataset. The constructor converts this parameter to a PathPointer object, such as a FileSystemPathPointer or ZipFilePathPointer, without ensuring the target path resides within the restricted boundaries.

While subsequent read operations theoretically leverage the sandboxed file-opening wrapper (nltk.pathsec.open), several corpus reader subclasses execute eager local operations immediately upon construction. For example, the PanLexLiteCorpusReader attempts to query a local database via Python's default, unsandboxed sqlite3.connect() function. This bypasses the NLTK path restriction mechanisms entirely because standard library calls are not subjected to nltk.pathsec interception.

Similarly, the LinThesaurusCorpusReader subclass processes thesaurus mappings directly using the built-in open() function on derived filesystem paths. Furthermore, utility functions like find_corpus_fileids use standard filesystem functions (os.walk) to identify corpus structures before the base class verification logic executes. Because these structures resolve targets using unvalidated root paths, an attacker can trigger information disclosure or arbitrary database interactions prior to execution control checks.

Code Analysis and Vulnerable Path

An analysis of the underlying codebase reveals the discrepancy between the vulnerable design and the security fix implemented in version 3.10.3.

# Vulnerable constructor implementation in NLTK <= 3.10.2
def __init__(self, root, fileids, encoding="utf8", tagset=None):
    # The root string was processed without checking the sandbox status
    if isinstance(root, str) and not isinstance(root, PathPointer):
        m = re.match(r"(.*\.zip)/?(.*)$|", root)
        # Path pointer objects are built immediately

In the patched version, the constructor actively checks pathsec.ENFORCE and applies a validation routine to block illegitimate paths:

# Patched constructor implementation in NLTK >= 3.10.3
def __init__(self, root, fileids, encoding="utf8", tagset=None):
    # Core protection logic added:
    if pathsec.ENFORCE and isinstance(root, str):
        pathsec.validate_path(root, context="CorpusReader.__init__")
 
    if isinstance(root, str) and not isinstance(root, PathPointer):
        m = re.match(r"(.*\.zip)/?(.*)$|", root)

For subclasses like PanLexLiteCorpusReader, the vulnerability allowed direct access to SQLite files using unvalidated database paths. The patch intercepts the directory configuration path before passing it to the database driver:

# Patched database initialization in panlex_lite.py
def __init__(self, root):
    from nltk.pathsec import validate_path
    db_path = os.path.join(root, "db.sqlite")
    # Restrict SQLite connection targets using validate_path
    # 'required_root' suppresses symbolic link traversal attempts
    validate_path(db_path, context="PanLexLiteCorpusReader", required_root=root)
    self._c = sqlite3.connect(db_path).cursor()

Exploitation Methodology

Exploitation of this vulnerability requires an application configuration where user inputs can directly or indirectly influence the corpus root parameter passed to NLTK corpus readers. This scenario is common in multi-tenant workspaces, online processing notebooks, and data processing pipelines that dynamically load user-submitted metadata.

An attacker can trigger directory walking on restricted host paths using find_corpus_fileids. When a target system exposes this file-scanning function, an attacker can specify a sensitive path, such as the system configuration folder, to obtain a structured directory index.

# Proof of concept demonstrating out-of-sandbox directory scanning
from nltk.corpus.reader.util import find_corpus_fileids
from nltk.data import FileSystemPathPointer
 
# Construct an arbitrary pointer to check restricted folders
root_pointer = FileSystemPathPointer("/etc")
 
# Scanning executes os.walk directly, bypassing sandbox boundaries
fileids = find_corpus_fileids(root_pointer, r".*")
print(fileids)

In a second exploitation scenario, an attacker can target the database connection routine of PanLexLiteCorpusReader. If the root variable points to an arbitrary location containing an SQLite database structure, the application will initialize an active SQLite connection session, allowing database interactions without satisfying path restrictions.

Security Impact Assessment

The security impact of CVE-2026-79674 is categorized as High, as reflected by its CVSS v4.0 score of 8.8. Successful exploitation allows complete local directory mapping and unauthorized read access to accessible host system files.

In containerized or restricted multi-tenant environments, this bypass allows the extraction of database credentials, access tokens, and environment parameters from the container filesystem. Because the vulnerability allows raw database initiation with arbitrary SQLite files, an attacker could interact with external sqlite structures, leading to unauthorized information extraction.

Since this exploit is purely logical and relies on missing path verification steps, exploitation attempts do not trigger standard memory corruption defense mechanisms. The lack of active public exploits decreases immediate risk, but the ease of implementation makes manual exploitation highly viable if systems remain unpatched.

Defensive Remediation

To mitigate CVE-2026-79674, system administrators and developers must upgrade the nltk package to version 3.10.3 or higher. This update resolves the logical path validation gaps in the CorpusReader core module and structural utilities.

When immediate library upgrades are not feasible, applications must implement path sanitization routines to ensure input paths resolve to authorized locations before initiating NLTK components. Using Python's pathlib.Path.resolve() method assists in verifying that resolving paths remain within safe boundaries.

from pathlib import Path
 
ALLOWED_ROOT = Path("/var/data/nltk_data").resolve()
 
def validate_user_input(input_path_str):
    target_path = Path(input_path_str).resolve()
    if not target_path.is_relative_to(ALLOWED_ROOT):
        raise PermissionError("Path is outside the authorized data root")
    return target_path

Fix Analysis (1)

Technical Appendix

CVSS Score
8.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
EPSS Probability
0.23%
Top 87% most exploited

Affected Systems

NLTK (Natural Language Toolkit) versions prior to 3.10.3

Affected Versions Detail

Product
Affected Versions
Fixed Version
nltk
nltk
< 3.10.33.10.3
AttributeDetail
CWE IDCWE-73 (External Control of File Name or Path)
Attack VectorNetwork
CVSS v3.1 Score8.2 (High)
CVSS v4.0 Score8.8 (High)
EPSS Score0.00226
CISA KEV ListedFalse
Exploit Statuspoc

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
T1213Data from Information Repositories
Collection
CWE-73
External Control of File Name or Path

The software allows user input to control path and filename resolutions, bypassing intended access controls.

Vulnerability Timeline

Vulnerability mitigated internally with patch commit bc007200d123c1a98d74c2eb230f5e06c53886b8
2026-08-11
CVE-2026-79674 / GHSA-3gq4-3j92-5w49 published by security authorities
2026-08-25
CVE record analyzed and updated in the National Vulnerability Database (NVD)
2026-08-31

References & Sources

  • [1]GitHub Security Advisory GHSA-3gq4-3j92-5w49
  • [2]NVD CVE-2026-79674
  • [3]NLTK v3.10.3 Release Tag

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•37 minutes ago•CVE-2026-112906
4.7

CVE-2026-112906: Mutual Exclusion Bypass via Inode Recycling and Time Tracking Race in filelock

A local race condition and mutual exclusion bypass vulnerability exists in filelock versions 4.1.0 through 4.2.0. On Linux filesystems with rapid inode reuse, a local attacker can manipulate modification timestamps and lock files to cause waiting processes to falsely evict active soft lock markers.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 2 hours ago•CVE-2026-114055
7.5

CVE-2026-114055: Uncontrolled Resource Consumption in vLLM via Unvalidated Multimodal Kwargs

vLLM prior to version 0.31.0 contains an uncontrolled resource consumption vulnerability (CWE-400) in its HTTP API request handling logic. Unauthenticated remote attackers can transmit per-request keyword arguments (`mm_processor_kwargs` and `media_io_kwargs`) that are passed directly into internal multimodal preprocessing pipelines, causing CPU/GPU memory exhaustion and crashing the engine process.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 3 hours ago•CVE-2026-62204
6.6

CVE-2026-62204: Arbitrary Bazaar Package Overwrite in SiYuan via Parameter Mismatch

An insufficient verification of data authenticity vulnerability in SiYuan prior to version 3.7.4 allows an attacker to overwrite arbitrary installed marketplace packages (plugins, widgets, themes, and templates). By providing a mismatched package name and package archive repository URL during a Bazaar installation request, arbitrary file write into trusted plugin directories can be achieved, enabling persistence and execution across application restarts.

Alon Barad
Alon Barad
7 views•5 min read
•about 4 hours ago•CVE-2026-115478
7.1

CVE-2026-115478: Incorrect Authorization and Incomplete Cleanup in obsidian-tc

In obsidian-tc versions 1.0.1 through 1.31.3, memory lifecycle tools fail to validate note ownership prior to rematerializing Markdown files and execute non-atomic SQLite database mutations. An authorized caller can overwrite arbitrary note bodies on disk and cause persistent desynchronization between the database memory graph and physical vault files.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 5 hours ago•CVE-2026-115477
7.1

CVE-2026-115477: Human-in-the-Loop Authorization Bypass in obsidian-tc

A high-severity authorization bypass vulnerability in obsidian-tc allows clients to bypass Human-In-The-Loop (HITL) confirmation prompts over Streamable HTTP deployments. Due to incomplete validation of returned prompt responses, an attacker echoing a signed requestState token can force execution of destructive vault operations even if a human user declines or cancels the prompt.

Alon Barad
Alon Barad
10 views•5 min read
•about 6 hours ago•CVE-2026-113790
6.0

CVE-2026-113790: Uncontrolled Resource Consumption in pypdf Container Parsing

A Denial of Service (DoS) vulnerability in pypdf versions prior to 6.21.0 allows remote attackers to cause high CPU and memory resource exhaustion by supplying PDF files containing oversized or deeply nested arrays, dictionaries, or content streams.

Alon Barad
Alon Barad
8 views•5 min read