All vulnerabilities

PyPI

CVE-2026-128134

NLTK dot2img runs Graphviz 'dot' without the trusted-exec chokepoint, enabling local code execution via a writable PATH element

Severity
High 7.8
Published
16 Nov 2026
Last changed
16 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.10.4
Exploit chance
0.2% in the next 30 daysHigher than 7% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-426CWE-427
Attack
Needs local access · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Also known as
GHSA-7mxv-7h3q-9324
Sources
OSV.dev and GitHub

Description

nltk.parse.dependencygraph.dot2img invokes the Graphviz dot executable without the trusted-execution guarantees that NLTK applies to its other native-tool wrappers. The function resolves dot by bare name and then runs the resolved absolute path with a raw subprocess.run, omitting the ownership/writability check and the loader-environment scrub that nltk.pathsec.spawn_trusted provides. On a POSIX host, a local, unprivileged actor who can write to any group/world-writable directory that appears on the victim's PATH can plant a trojan dot; when the victim later renders a DependencyGraph (for example in a Jupyter notebook, which auto-invokes _repr_svg_) or calls dot2img directly, the planted binary executes as the victim. The advisory GHSA-6hwm-xvph-95vm (CVE-2026-78680) addressed the same untrusted-search-path class for the Graphviz dot invoker in nltk/translate/api.py, but dot2img received only part of that remediation and remains exploitable.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
nltkPyPI · osv:PyPI:nltk
  • Every version before 3.10.4

About nltk

Weekly downloads (PyPI)
11,948,568PyPI Stats, 23 Nov 2026

References