Impact
NLTK versions before 3.10.3 contain an implementation error where corpus reader functions open files using the built‑in open() call rather than the safer nltk.pathsec.open(). Because of this, a malicious user can create a symbolic link that points outside the intended corpus directory. The reader then follows the link and reads arbitrary files located beyond the trusted root. This leads to the disclosure of sensitive data stored on the filesystem. The weakness is a classic path traversal flaw classified as CWE‑22.
Affected Systems
The vulnerability affects the Python library NLTK. Versions earlier than 3.10.3 are vulnerable; the fix is delivered in 3.10.3 and subsequent releases.
Risk and Exploitability
Due to the path‑traversal entry point, the CVSS score is 8.2, indicating a high impact if the attacker can place symlinked corpus files under a trusted root. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires the attacker to have a way to influence the data files that NLTK processes, which could arise from an application that loads user‑supplied corpora. If this condition is met, the attack can result in unauthorized disclosure of files that lie outside the intended corpus directory.
OpenCVE Enrichment
Github GHSA