GitHub Advisoryadvisory · PyPI
GHSA-6hwm-xvph-95vm NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary
HIGH
Official page ↗
- Aliases
- CVE-2026-78680
- Ecosystem
- PyPI
- Packages
- nltk
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-426, CWE-427
- Reviewed
- 2026-09-01
Affected packages
• PyPI nltk: < 3.10.3 → fixed in 3.10.3
Description
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 ( LookupError (refused) safe
Attack 2: ./dot/dot (dir 'dot' holding 'dot') -> LookupError (refused) safe
Attack 3: '.' on PATH + ./dot -> LookupError (refused) safe
Attack 4: attacker-writable ABSOLUTE dir on PATH -> returned /…/evilbin/dot (absolute)
```
Attack 4 is out of scope: trusting an absolute directory that is already on `PATH` is the operating system's own trust model — an attacker who can write to a `PATH` directory owns the account regardless of NLTK. `find_binary` defends specifically against the CWD/relative injection that bare-name exec is vulnerable to (attacks 1–3), which is exactly what this fix inherits.
Environment: python 3.13.7. `dot` is not required to reproduce — the planted binary is the payload.
Related
Alias · CVE (1)
- CVE-2026-78680 NLTK versions before 3.10.3 fail to use validated absolute paths when invoking the Graphviz dot binary in dependencygraph.dot2img and… vulnerability
References
- https://github.com/nltk/nltk/security/advisories/GHSA-6hwm-xvph-95vm web
- https://nvd.nist.gov/vuln/detail/CVE-2026-78680 advisory
- https://github.com/nltk/nltk/commit/1a3cd1764ab3deb084fb66d0ffb4873717659538 web
- https://github.com/nltk/nltk package
- https://github.com/nltk/nltk/releases/tag/v3.10.3 web
- https://www.vulncheck.com/advisories/nltk-before-arbitrary-code-execution-via-graphviz-dot-binary web