CVE-2026-78680
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` — called `find_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. --- ## Attack demonstration Captured output, not illustrative. A `./dot` that writes a `PWNED` marker, planted in the CWD with `.` prepended to `PATH`. **The vulnerable behaviour (old bare-name exec):** ``` Control (OLD behavior) — bare ['dot'] in this dir with '.' on PATH: bare ['dot'] executed planted binary = True ``` **The patched functions refuse it:** ``` FIXED code, with ./dot planted and '.' on PATH: dependencygraph.dot2img : Exception "Cannot find the dot binary..." | planted-binary-executed=False safe AlignedSent._repr_svg_ : Exception "Cannot find the dot binary..." | planted-binary-executed=False safe ``` **And `find_binary` itself was attacked directly** (the fix trusts nothing else): ``` Attack 1: ./dot in CWD, no dot on PATH -> LookupError (refused) safe Attack 2: ./dot/dot (dir 'dot' holding 'dot') -> LookupError (refused) safe Attack 3: '.' on PATH + ./dot -> LookupError (refused) safe Attack 4: attacke
Properties
- ghsa_id
- GHSA-6hwm-xvph-95vm
- severity
- high
- summary
- NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary
- cvss_score
- 7.8
- cve_id
- CVE-2026-78680
- cvss_vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- is_ghsa_only
- false
- ghsa_published
- 2026-09-01T20:27:20Z
- source_url
- https://github.com/advisories/GHSA-6hwm-xvph-95vm
- ghsa_updated
- 2026-09-01T20:27:21Z
Related Entities (5)
VULNERABLE_TO (1)
AFFECTS (1)
HAS_WEAKNESS (2)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph