CVE-2026-71514
JSON

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 packageVersionsReported by
nltk nltkfrom 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.3GitHub Advisory Database, PyPA Advisory Database

All scores

VulnCheck2.0low CVSS:4.0CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
VulnCheck2.5low CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
GitHub2.5low CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
GitHublow CVSS:4.0CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
NVD3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
PyPA Advisory Database3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

Classification

CWE-22

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

Sources

SourceRecordLicence
CVE ListCVE-2026-71514 changed 2026-08-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-cv22-g7mw-8v73 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-71514 changed 2026-10-14Public domain
PyPA Advisory DatabasePYSEC-2026-3790 changed 2026-09-10CC-BY-4.0