Impact
NLTK versions before 3.10.2 contain a vulnerability that allows an attacker to create a symbolic link within the corpus root directory and then use the IPIPANCorpusReader methods—channels(), domains(), categories(), or fileids()—to read arbitrary files situated elsewhere on the system. The weakness exploited is a path traversal flaw, classified as CWE-22. The path validation performed by nltk.pathsec is bypassed entirely, resulting in a CVE‑22 style arbitrary file read that can expose sensitive data if the process runs with sufficient privileges.
Affected Systems
All installations of the Natural Language Toolkit using a version earlier than 3.10.2 are affected. The single vendor listed is nltk, and the issue spans all product releases prior to the 3.10.2 update.
Risk and Exploitability
The CVSS score of 6.8 indicates moderate severity. EPSS is not available, and the vulnerability is not listed in the CISA KEV catalog. Attackers must have the ability to create files in the corpus root directory, which implies local access or an attacker already able to influence the file system. Once a symlink is placed, the affected methods can read any file the process can access, potentially leaking confidential information. The absence of an exploit probability metric suggests limited known exploitation, but the impact could be significant in environments with privileged processes.
OpenCVE Enrichment
Github GHSA