Gptline: NLTK: Corpus Reader Sandbox Bypass (CVE-2026-79674)
NLTK's corpus-reader constructors, specifically LinThesaurusCorpusReader and PanLexLiteCorpusReader, can bypass the nltk.pathsec sandbox designed to restrict file and database access. This allows these readers to perform file and database reads outside the intended sandbox root even when sandbox enforcement is enabled. The vulnerability arises because the CorpusReader.__init__ method converts the root path to a FileSystemPathPointer without applying pathsec validation, and subsequent file/database operations use builtin open() or sqlite3.connect() directly, bypassing sandbox controls.
AI Analysis
Technical Summary
The vulnerability in NLTK (Natural Language Toolkit) affects the corpus-reader constructors, notably LinThesaurusCorpusReader and PanLexLiteCorpusReader, which can bypass the path sandbox enforced by nltk.pathsec. Although pathsec.open() blocks unauthorized file access, these corpus readers use builtin open() and sqlite3.connect() on paths derived from the root without sandbox validation. This allows them to read files or databases outside the sandbox root directory, violating the intended sandbox boundary. The issue is present in version 3.10.2 (commit 474af1f5a94b1b8d53fc2b6defec3a2ce7633b74) and was verified on Python 3.13.14. The root cause is that CorpusReader.__init__ converts the root string to a FileSystemPathPointer without pathsec validation, and the readers then access files/databases directly, bypassing sandbox enforcement.
Potential Impact
An attacker or user able to supply a corpus root path to these NLTK corpus readers can cause the application to read files or databases outside the intended sandbox directory. This could lead to unauthorized information disclosure if sensitive files or databases are accessible. No privileges beyond supplying the root path are required. The impact is limited to file and database read access outside the sandbox boundary.
Mitigation Recommendations
A patch is available for this vulnerability. Users should update NLTK to a fixed version where CorpusReader constructors enforce pathsec sandbox validation on the root path and avoid direct builtin open() or sqlite3.connect() calls on unvalidated paths. Until patched, avoid using LinThesaurusCorpusReader and PanLexLiteCorpusReader with untrusted root paths.
Gptline: NLTK: Corpus Reader Sandbox Bypass (CVE-2026-79674)
Description
NLTK's corpus-reader constructors, specifically LinThesaurusCorpusReader and PanLexLiteCorpusReader, can bypass the nltk.pathsec sandbox designed to restrict file and database access. This allows these readers to perform file and database reads outside the intended sandbox root even when sandbox enforcement is enabled. The vulnerability arises because the CorpusReader.__init__ method converts the root path to a FileSystemPathPointer without applying pathsec validation, and subsequent file/database operations use builtin open() or sqlite3.connect() directly, bypassing sandbox controls.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in NLTK (Natural Language Toolkit) affects the corpus-reader constructors, notably LinThesaurusCorpusReader and PanLexLiteCorpusReader, which can bypass the path sandbox enforced by nltk.pathsec. Although pathsec.open() blocks unauthorized file access, these corpus readers use builtin open() and sqlite3.connect() on paths derived from the root without sandbox validation. This allows them to read files or databases outside the sandbox root directory, violating the intended sandbox boundary. The issue is present in version 3.10.2 (commit 474af1f5a94b1b8d53fc2b6defec3a2ce7633b74) and was verified on Python 3.13.14. The root cause is that CorpusReader.__init__ converts the root string to a FileSystemPathPointer without pathsec validation, and the readers then access files/databases directly, bypassing sandbox enforcement.
Potential Impact
An attacker or user able to supply a corpus root path to these NLTK corpus readers can cause the application to read files or databases outside the intended sandbox directory. This could lead to unauthorized information disclosure if sensitive files or databases are accessible. No privileges beyond supplying the root path are required. The impact is limited to file and database read access outside the sandbox boundary.
Mitigation Recommendations
A patch is available for this vulnerability. Users should update NLTK to a fixed version where CorpusReader constructors enforce pathsec sandbox validation on the root path and avoid direct builtin open() or sqlite3.connect() calls on unvalidated paths. Until patched, avoid using LinThesaurusCorpusReader and PanLexLiteCorpusReader with untrusted root paths.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-gptline-CVE-2026-79674
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6aac8e5a55bf5e2cf5491af9
Added to database: 09/18/2026, 01:05:30 UTC
Last enriched: 09/18/2026, 01:51:38 UTC
Last updated: 09/18/2026, 02:06:59 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.