Impact
NLTK versions up to 3.10.3 contain a path traversal flaw in the WekaClassifier module that allows an attacker in control of the model filename or model argument to bypass the nltk.pathsec containment checks. By providing an unvalidated path, the caller can cause the underlying Weka JVM to write arbitrary files via the -d option or probe files via -l outside the permitted data roots, potentially leading to unauthorized file creation, modification, or read access and ultimately enabling code execution.
Affected Systems
All installations of NLTK using versions 3.10.3 or earlier are potentially vulnerable. The flaw exists in the default distribution of NLTK and affects any environment that imports or utilizes the WekaClassifier class without additional path validation.
Risk and Exploitability
With a CVSS score of 8.3, the vulnerability represents a high severity risk. Although no EPSS score is available and the flaw is not listed in the CISA KEV catalog, the nature of the path traversal allows local or remote attackers who can influence the model path to write or read files on the host system. This capability can lead to remote code execution or data exfiltration if the attacker targets executable or sensitive locations. The attack vector requires code execution within the NLTK runtime or the ability to control the model filename, which is typically feasible through scripts or applications that load models dynamically.
OpenCVE Enrichment