CVE-2026-126295 — Nltk — CWE-22 · CWE-73
CVE-2026-126295 is a MEDIUM severity Path Traversal & Arbitrary File Read vulnerability (CWE-22, CWE-73) (CVSS 6.8/10 (EPSS: 0.3%)) affecting Nltk. Technical vector analysis shows that an attacker can exploit this flaw via local access (AV:L) without authentication (PR:N) with zero user interaction (UI:N), allowing unauthorized disclosure of sensitive data (C:H).
📄 Official NVD / MITRE Original Record Text
## Summary `BllipParser` in `nltk/parse/bllip.py` hands caller-supplied filesystem paths to the native `bllipparser` C extension without routing them through NLTK's `pathsec` validation. The constructor parameters `parser_model`, `reranker_features`, and `reranker_weights`, and the alternative `from_unified_model_dir()` entry point, flow directly to the C extension's `load_parser_model()` and `load_reranker_model()` calls, which open and read the given path at the OS level. Any application that passes an attacker-influenced path to this API reads a file of the attacker's choosing from anywhere on the filesystem, outside the NLTK data roots that every other NLTK tool wrapper confines access to. ## Root Cause As of NLTK 3.10.0, `SECURITY.md` documents a centralized I/O security module (`nltk.pathsec`) with strict enforcement enabled by default, under which file-backed resources must resolve inside allowed NLTK data directories. For paths handed to external tools and native extensions that open files themselves, the module provides `validate_tool_path()`, which runs name-safety checks, rejects option-shaped, URL-shaped, and traversal inputs, opens the path with `O_NOFOLLOW` requiring a regular single-linked file, and returns the validated string the caller must use. Every sibling tool wrapper applies it. `BllipParser` applies none of it: the module imports only `ParserI`, `safe_print`, and `Tree`, with zero `pathsec` references, so the three model-path parameters reach the C
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-126295
CVSS 6.8/10 · MEDIUM · 13.11.2026
CWE: CWE-22, CWE-73
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Path Traversal / LFI
Summary: ## Summary
BllipParser in nltk/parse/bllip.py hands caller-supplied filesystem paths to the native bllipparser C extension without routing them through NLTK's pathsec validation. The constructor parameters parser_model, reranker_features, and reranker_weights, and the alternative from_unified_model_dir() entry point, flow directly to the C extension's load_parser_model() and …
Affected: nltk
⚡ ATTACK CHAIN
1. Test ../../../../etc/passwd in file parameters.
2. URL encode variants: ..%2F, ..%252F, null byte %00.
3. PHP LFI to RCE via log poisoning: inject PHP in User-Agent, include access log.
4. PHP wrappers: php://filter/convert.base64-encode/resource=config.php
🔧 Tools: LFISuite, ffuf, Burp Suite, dotdotpwn
🗺️ MITRE ATT&CK: T1083 (File and Directory Discovery), T1552 (Unsecured Credentials)
🌍 REAL WORLD IMPACT
All confidential data readable/stealable.
🛡️ REMEDIATION
→ Apply vendor security update for nltk.
→ Use realpath() canonicalization, implement allowlists.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
📋 Routine update cycle (30 days)
────────────────────────────────────────
[Kural Tabanlı Otomatik Güvenlik Analizi]