NLTK before 3.10.0 contains an arbitrary local file read vulnerability in StreamBackedCorpusView that bypasses pathsec.ENFORCE by calling builtins.open() directly instead of pathsec.open(). Attackers who control the fileid argument can read arbitrary local files regardless of the ENFORCE setting, including sensitive system files and application credentials.
Fix
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/nltk/nltk/security/advisories/GHSA-x5ph-mj9p-rfr8 Exploit, Vendor Advisory
- https://github.com/nltk/nltk/security/advisories/GHSA-x5ph-mj9p-rfr8 Exploit, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 8.7 · nltkNVD modified 2026-10-14 13:10
Affected (CPE criteria) 1
cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
References 3
- https://github.com/nltk/nltk/security/advisories/GHSA-x5ph-mj9p-rfr8 Exploit, Vendor Advisory
- https://www.vulncheck.com/advisories/nltk-streambackedcorpusview-bypasses-pathsec-enforce-arbitrary-file-read Third Party Advisory
- https://github.com/nltk/nltk/security/advisories/GHSA-x5ph-mj9p-rfr8 Exploit, Vendor Advisory