CVE-2026-78680: NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary
Two NLTK sites executed the Graphviz dot program by bare name, so process creation resolved it via the search path — and on Windows via the current working directory — rather than a validated absolute location. An attacker who can place a file named dot where resolution looks (the CWD on Windows, or a writable/relative entry such as . on PATH) has their binary executed in place of Graphviz (arbitrary code execution).
Affected (<= 3.10.2):
nltk.parse.dependencygraph.dot2img— calledfind_binary("dot")but discarded the returned validated path and then ran the bare name["dot", ...], so the validation had no effect.nltk.translate.api.AlignedSent._repr_svg_— ran the bare name with no validation at all (IPython SVG rendering).
This is the same class already fixed for the senna, weka, boxer, malt, repp and hunpos wrappers. nltk.internals.find_binary refuses a CWD-relative match for a bare tool name and returns only a trusted absolute path; the fix runs that path in both sites.
References
- github.com/advisories/GHSA-6hwm-xvph-95vm
- github.com/nltk/nltk/commit/1a3cd1764ab3deb084fb66d0ffb4873717659538
- github.com/nltk/nltk/releases/tag/v3.10.3
- github.com/nltk/nltk/security/advisories/GHSA-6hwm-xvph-95vm
- nvd.nist.gov/vuln/detail/CVE-2026-78680
- www.vulncheck.com/advisories/nltk-before-arbitrary-code-execution-via-graphviz-dot-binary
Code Behaviors & Features
Detect and mitigate CVE-2026-78680 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →