Gptline: NLTK: Corpus readers follow symlinks outside trusted roots despite pathsec enforcement (CVE-2026-79676)
Several corpus readers in NLTK (Natural Language Toolkit) improperly handle symlinked files, allowing path traversal and symlink boundary bypass. These readers reopen paths derived from trusted roots using raw open() calls instead of the symlink-aware nltk.pathsec.open(), enabling attackers to disclose files outside the trusted corpus root. The issue affects specific readers such as ipipan, crubadan, and lin in versions 3.9.4 and 3.10.0-rc2. A fix is available that enforces path validation and trusted-root boundaries end to end.
AI Analysis
Technical Summary
The vulnerability involves path traversal and symlink boundary bypass in several NLTK corpus readers (ipipan, crubadan, lin, and others). These readers derive file paths from trusted corpus roots but then reopen them using Python's built-in open() instead of nltk.pathsec.open(), which enforces trusted-root boundaries. This allows symlinks placed inside the trusted root to point outside it and have their contents read and returned by public corpus-reader methods, defeating the intended sandboxing. The issue was reproduced in NLTK versions 3.9.4 and 3.10.0-rc2. The root cause is the failure to preserve PathPointer and required_root semantics when reopening files. The fix involves calling nltk.pathsec.validate_path with required_root scoping before opening files, ensuring escapes outside the trusted root are blocked. The patch has been applied after a full codebase audit, and tests confirm the vulnerability is mitigated.
Potential Impact
An attacker who can place or influence corpus files or symlinks inside a trusted NLTK data root can cause corpus readers to disclose file contents from outside the trusted root directory. This breaks the security boundary intended to isolate trusted corpus data from untrusted or sensitive files elsewhere on the filesystem. The exposure occurs through normal corpus-reader API methods, potentially leaking sensitive information.
Mitigation Recommendations
A patch is available that enforces path validation and preserves the trusted-root boundary by replacing raw open() calls with nltk.pathsec.open() or equivalent helpers that validate paths with required_root scoping. Users should upgrade to the patched versions of NLTK corpus readers once available. Until patched, avoid processing attacker-controlled corpora or symlinks inside trusted corpus roots. The vendor advisory confirms the fix and recommends applying it to all corpus readers to prevent symlink escapes.
Gptline: NLTK: Corpus readers follow symlinks outside trusted roots despite pathsec enforcement (CVE-2026-79676)
Description
Several corpus readers in NLTK (Natural Language Toolkit) improperly handle symlinked files, allowing path traversal and symlink boundary bypass. These readers reopen paths derived from trusted roots using raw open() calls instead of the symlink-aware nltk.pathsec.open(), enabling attackers to disclose files outside the trusted corpus root. The issue affects specific readers such as ipipan, crubadan, and lin in versions 3.9.4 and 3.10.0-rc2. A fix is available that enforces path validation and trusted-root boundaries end to end.
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 involves path traversal and symlink boundary bypass in several NLTK corpus readers (ipipan, crubadan, lin, and others). These readers derive file paths from trusted corpus roots but then reopen them using Python's built-in open() instead of nltk.pathsec.open(), which enforces trusted-root boundaries. This allows symlinks placed inside the trusted root to point outside it and have their contents read and returned by public corpus-reader methods, defeating the intended sandboxing. The issue was reproduced in NLTK versions 3.9.4 and 3.10.0-rc2. The root cause is the failure to preserve PathPointer and required_root semantics when reopening files. The fix involves calling nltk.pathsec.validate_path with required_root scoping before opening files, ensuring escapes outside the trusted root are blocked. The patch has been applied after a full codebase audit, and tests confirm the vulnerability is mitigated.
Potential Impact
An attacker who can place or influence corpus files or symlinks inside a trusted NLTK data root can cause corpus readers to disclose file contents from outside the trusted root directory. This breaks the security boundary intended to isolate trusted corpus data from untrusted or sensitive files elsewhere on the filesystem. The exposure occurs through normal corpus-reader API methods, potentially leaking sensitive information.
Mitigation Recommendations
A patch is available that enforces path validation and preserves the trusted-root boundary by replacing raw open() calls with nltk.pathsec.open() or equivalent helpers that validate paths with required_root scoping. Users should upgrade to the patched versions of NLTK corpus readers once available. Until patched, avoid processing attacker-controlled corpora or symlinks inside trusted corpus roots. The vendor advisory confirms the fix and recommends applying it to all corpus readers to prevent symlink escapes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-gptline-CVE-2026-79676
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6aac8e5a55bf5e2cf5491af7
Added to database: 09/18/2026, 01:05:30 UTC
Last enriched: 09/18/2026, 01:51:28 UTC
Last updated: 09/18/2026, 02:07:05 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.