NLTK versions before 3.9.4 contain a symlink escape vulnerability in CorpusReader.open() that allows local attackers to read arbitrary files outside the corpus root. The vulnerability exists because path validation is lexical and does not account for symlink resolution, enabling attackers to place symlinks inside the corpus root to access files outside the intended boundary.
Fix
Patch, vendor advisory and mitigation references on NVD 3
- https://github.com/nltk/nltk/security/advisories/GHSA-r6gq-whwq-mvg9 Exploit, Vendor Advisory
- https://www.vulncheck.com/advisories/nltk-before-symlink-escape-via-corpusreader Vendor Advisory
- https://github.com/nltk/nltk/security/advisories/GHSA-r6gq-whwq-mvg9 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.6 · 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-r6gq-whwq-mvg9 Exploit, Vendor Advisory
- https://www.vulncheck.com/advisories/nltk-before-symlink-escape-via-corpusreader Vendor Advisory
- https://github.com/nltk/nltk/security/advisories/GHSA-r6gq-whwq-mvg9 Exploit, Vendor Advisory