Impact
NLTK versions prior to 3.10.3 contain a filesystem containment bypass in the Downloader.download and Downloader.incr_download methods. This flaw allows an attacker who has write access to the shared downloader directory to create hardlinks that point to files located outside the intended install tree. When the package is downloaded and extracted, those hardlinked files are overwritten by the package contents, effectively allowing the attacker to modify arbitrary files on the system.
Affected Systems
The NLTK library released under the package name NLTK, version 3.10.3 and earlier, is susceptible to this issue.
Risk and Exploitability
The vulnerability has a CVSS score of 6.9, indicating moderate impact. EPSS data is not available, and the flaw has not been identified as a Known Exploited Vulnerability by CISA. Based on the description, the likely attack vector is a local attacker who can write to the downloader directory. Successful exploitation would enable overwrite of files outside the installation root, compromising confidentiality, integrity, and potentially availability of system components.
OpenCVE Enrichment
Github GHSA