Description
NLTK versions before 3.10.3 fail to use validated absolute paths when invoking the Graphviz dot binary in dependencygraph.dot2img and AlignedSent._repr_svg_, allowing attackers to execute arbitrary code by placing a malicious dot binary in the search path or current working directory. Attackers can exploit bare-name binary resolution on Windows via the current working directory or on Unix-like systems via relative PATH entries to execute their binary instead of the legitimate Graphviz tool.
Published: 2026-08-25
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

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.

Generated by OpenCVE AI on August 25, 2026 at 04:07 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade NLTK to version 3.10.3 or later.
  • If upgrading is not possible, configure the environment to use an absolute path to the legitimate Graphviz dot binary by setting an environment variable (e.g., DOT_PATH) or by ensuring the dot binary in PATH is the correct one and has restrictive permissions.
  • Remove or rename any dot executables in the current working directory or any directories listed in PATH that could be used by NLTK to avoid executing a malicious binary.

Generated by OpenCVE AI on August 25, 2026 at 04:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-6hwm-xvph-95vm NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary
History

Tue, 25 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 25 Aug 2026 02:00:00 +0000

Type Values Removed Values Added
Description NLTK versions before 3.10.3 fail to use validated absolute paths when invoking the Graphviz dot binary in dependencygraph.dot2img and AlignedSent._repr_svg_, allowing attackers to execute arbitrary code by placing a malicious dot binary in the search path or current working directory. Attackers can exploit bare-name binary resolution on Windows via the current working directory or on Unix-like systems via relative PATH entries to execute their binary instead of the legitimate Graphviz tool.
Title NLTK before 3.10.3 Arbitrary Code Execution via Graphviz dot Binary
First Time appeared Nltk
Nltk nltk
Weaknesses CWE-426
CPEs cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
Vendors & Products Nltk
Nltk nltk
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-25T12:43:04.211Z

Reserved: 2026-08-25T01:17:12.262Z

Link: CVE-2026-78680

cve-icon Vulnrichment

Updated: 2026-08-25T12:31:23.151Z

cve-icon NVD

Status : Received

Published: 2026-08-25T02:16:52.607

Modified: 2026-08-25T13:19:31.457

Link: CVE-2026-78680

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-25T05:30:16Z

Weaknesses