2.0low
NLTK 3.9.4 through 3.10.2 Path Traversal via CrubadanCorpusReader pathsec Bypass
- Severity
- 2.0low CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.16% (higher than 5% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-cv22-g7mw-8v73PYSEC-2026-3790
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nltk nltk | from 3.9.4 before 3.10.3, from 3.9.4 up to 3.10.2 Not affected: 3.10.3 | CVE List, NVD |
| nltk (PyPI) | from 3.9.4 before 3.10.3 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| VulnCheck | 2.0low CVSS:4.0 | CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| VulnCheck | 2.5low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
| GitHub | 2.5low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| NVD | 3.3low CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
| PyPA Advisory Database | 3.3low CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
NLTK 3.9.4 hasta 3.10.2 contiene una vulnerabilidad de salto de ruta en CrubadanCorpusReader. _load_lang_ngrams une la raíz del corpus con crubadan_code, el valor de la columna 0 leído del archivo de mapeo corpus table.txt, y abre el resultado con la función incorporada open() en lugar del abridor validado por pathsec, por lo que os.path.join descarta la raíz cuando ese valor es absoluto y la lectura escapa del directorio del corpus sin la verificación de contención que nltk.pathsec aplica cuando ENFORCE está configurado. Un atacante que controla un paquete de corpus puede divulgar el contenido de archivos fuera de la raíz del corpus a través de lang_freq, limitado a rutas que terminan en -3grams.txt cuyo contenido se analiza como líneas de recuento de tokens.
References
| https://github.com/nltk/nltk/commit/10d34b3f4fe3fec74b76527a409eb0acbac2e8ab | fix, patch, web | |
| https://github.com/nltk/nltk | package, product | |
| https://github.com/nltk/nltk/blob/v3.10.2/nltk/corpus/reader/crubadan.py#L90-L98 | fix, patch, technical-description, web | |
| https://www.vulncheck.com/advisories/nltk-through-path-traversal-via-crubadancorpusreader-pathsec-bypass | advisory, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-71514 | advisory | |
| https://github.com/nltk/nltk/releases/tag/v3.10.3 | web | |
| https://github.com/advisories/GHSA-cv22-g7mw-8v73 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-71514 changed 2026-08-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cv22-g7mw-8v73 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-71514 changed 2026-10-14 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3790 changed 2026-09-10 | CC-BY-4.0 |