NLTK CrubadanCorpusReader path traversal allows arbitrary file disclosure
Low2.5CVE-2026-71514 · Published Aug 22, 2026 · updated Sep 10, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| nltk PyPI | >= 3.9.4, < 3.10.3 | 3.10.3 |
Details and references
NLTK 3.9.4 through 3.10.2 contains a path traversal vulnerability in CrubadanCorpusReader. _load_lang_ngrams joins the corpus root with crubadan_code, the column-0 value read from the corpus table.txt mapping file, and opens the result with the builtin open() rather than the pathsec-validated opener, so os.path.join discards the root when that value is absolute and the read escapes the corpus directory without the containment check nltk.pathsec applies when ENFORCE is set. An attacker who controls a corpus package can disclose file contents outside the corpus root through lang_freq, limited to paths ending in -3grams.txt whose contents parse as token count lines.
- CVSS 3.1
- CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-22
- Also known as
- CVE-2026-71514, PYSEC-2026-3790
- nvd.nist.gov/vuln/detail/CVE-2026-71514
- github.com/nltk/nltk/commit/10d34b3f4fe3fec74b76527a409eb0acbac2e8ab
- github.com/nltk/nltk
- github.com/nltk/nltk/blob/v3.10.2/nltk/corpus/reader/crubadan.py#L90-L98
- github.com/nltk/nltk/releases/tag/v3.10.3
- www.vulncheck.com/advisories/nltk-through-path-traversal-via-crubadancorpusreader-pathsec-bypass
More NLTK advisories
All NLTK| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Aug 22 | NLTK AllowlistUnpickler dotted-name validation bypass allows remote code execution CVE-2026-71513High8.8fixed in 3.10.3 | High8.8 | 3.10.3 |
| Aug 21 | NLTK TweetTokenizer vulnerable to denial of service through catastrophic regex backtracking CVE-2026-72818High7.5fixed in 3.10.1 | High7.5 | 3.10.1 |
| Aug 13 | nltk: Arbitrary File Read via Path Traversal in nltk.data.load() through Percent-Encoded Sequences CVE-2026-12243High7.5fixed in 3.10.0 | High7.5 | 3.10.0 |
| Sep 1 | NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary CVE-2026-78680High7.8fixed in 3.10.3 | High7.8 | 3.10.3 |
| Sep 1 | NLTK: JVM argument injection bypass via per-call options in the NLTK Stanford wrappers (incomplete fix of CVE-2026-12841) CVE-2026-79675Critical9.8fixed in 3.10.3 | Critical9.8 | 3.10.3 |
| Sep 2 | NLTK: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input CVE-2026-81724Medium5.3fixed in 3.10.3 | Medium5.3 | 3.10.3 |