Impact
NLTK calls the Graphviz dot binary without enforcing absolute paths, allowing an attacker to place a malicious dot executable in the current working directory or a PATH directory. When the dependencygraph.dot2img or AlignedSent._repr_svg_ functions run, the interpreter launches the attacker’s binary, leading to arbitrary code execution within the context of the NLTK process.
Affected Systems
The vulnerable product is Natural Language Toolkit (NLTK) versions prior to 3.10.3. Any installation of NLTK 3.10.2 or earlier is affected.
Risk and Exploitability
The CVSS score is 8.5, indicating high severity. The EPSS score is not available, leaving the exploitation probability unknown; however, the absence of a KEV listing does not mitigate the risk. Exploitation requires influence over the name or location of a dot binary in the environment. On Windows, a malicious dot can be placed in the current working directory; on Unix-like systems, it can be placed in a relative PATH entry. Once NLTK invokes the binary, the malicious code runs with the process’s privileges, enabling local code execution or privilege escalation.
OpenCVE Enrichment
Github GHSA