Impact
The vulnerability is a classic path traversal flaw in the WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader classes of NLTK, allowing an attacker who can supply a file path to read any file on the system. The flaw arises because the library does not enforce restrictions on relative or absolute paths and does not sanitize user inputs. An attacker could read confidential files—including system files, private keys, and API tokens—which can lead to privilege escalation or, when combined with other weaknesses, remote code execution.
Affected Systems
The flaw exists in all NLTK releases up to and including 3.9.2. Users of the WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader who deploy these libraries in machine‑learning APIs, chatbots, or NLP pipelines are affected. Future use of newer, patched releases can mitigate this issue; however, for the affected versions, the vulnerability remains unless the code is hardened.
Risk and Exploitability
The CVSS score of 7.5 indicates a high severity, while the EPSS score of less than 1% suggests a low probability of exploitation in the wild. The vulnerability is not yet listed in the CISA KEV catalog. Based on the description, the likely attack vector is local, requiring the attacker to influence user-supplied file paths used by the affected CorpusReader classes. The risk to confidentiality is significant, with the potential for sophisticated attackers to combine this flaw with other vulnerabilities to achieve remote code execution.
OpenCVE Enrichment