CVE-2026-79674: Path Sandbox Bypass in NLTK CorpusReader Constructors
Vulnerability ID: CVE-2026-79674
CVSS Score: 8.8
Published: 2026-09-08
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.
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.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-73 (External Control of File Name or Path)
- Attack Vector: Network
- CVSS v3.1 Score: 8.2 (High)
- CVSS v4.0 Score: 8.8 (High)
- EPSS Score: 0.00226
- CISA KEV Listed: False
- Exploit Status: poc
Affected Systems
- NLTK (Natural Language Toolkit) versions prior to 3.10.3
-
nltk: < 3.10.3 (Fixed in:
3.10.3)
Code Analysis
Commit: bc00720
Enforce sandbox validation in CorpusReader and utility function find_corpus_fileids
Mitigation Strategies
- Upgrade NLTK to version 3.10.3 or newer
- Implement application-level path validation using pathlib
- Explicitly enable pathsec.ENFORCE within application initialization files
- Configure low-privilege OS execution boundaries to isolate filesystem access
Remediation Steps:
- Identify active NLTK dependencies across environments
- Run 'pip install --upgrade nltk>=3.10.3' to update packages
- Deploy code validation filters to intercept and sanitize user-supplied directory strings
- Verify that pathsec.ENFORCE is set to True in production instances
References
Read the full report for CVE-2026-79674 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)