Path Traversal Vulnerability in NLTK by Natural Language Toolkit
CVE-2026-71514
2LOW
What is CVE-2026-71514?
The NLTK library versions 3.9.4 through 3.10.2 are susceptible to a path traversal vulnerability in the CrubadanCorpusReader component. This vulnerability occurs when the method _load_lang_ngrams combines the corpus root with specific values from the corpus table.txt, allowing an attacker with control over a corpus package to access file content outside the intended directory. This exploit can be executed through lang_freq for paths that end in '-3grams.txt', enabling the extraction of sensitive file data due to insufficient containment checks in the path management mechanism.
Affected Version(s)
nltk 3.9.4 < 3.10.3
nltk 3.10.3
