KeygraphLabs · CVE MCP

CVE-2022-36070 · GitHub_M

Poetry's Untrusted Search Path can lead to Local Code Execution on Windows

Poetry is a dependency manager for Python. To handle dependencies that come from a Git repository, Poetry executes various commands, e.g. `git config`. These commands are being executed using the executable’s name and not its absolute path. This can lead to the execution of untrusted code due to the way Windows resolves executable names to paths. Unlike Linux-based operating systems, Windows searches for the executable in the current directory first and looks in the paths that are defined in the `PATH` environment variable afterward. This vulnerability can lead to Arbitrary Code Execution, which would lead to the takeover of the system. If a developer is exploited, the attacker could steal credentials or persist their access. If the exploit happens on a server, the attackers could use their access to attack other internal systems. Since this vulnerability requires a fair amount of user interaction, it is not as dangerous as a remotely exploitable one. However, it still puts developers at risk when dealing with untrusted files in a way they think is safe. The victim could also not protect themself by vetting any Git or Poetry config files that might be present in the directory, b...

Published 2022-09-07, last changed 2026-06-17. Weakness: CWE-426.

CVSS
7.3
high, from NVD
EPSS
0.36%
percentile 31.9%, chance of exploitation in 30 days
Exploitation
None known
no KEV listing or public exploit in our indexes

How to fix

Upgrade to a fixed version: poetry 1.1.9 (PyPI). For the version that clears every advisory for your installed version, ask an agent for get_remediation.

Where the flaw is in the code

Fixed in python-poetry/poetry by 69bd6820e3, dca6ff2699. The fix changed source code, but no function could be located in it. Confidence: inferred (code changed near the fix, but no record names this exact commit as the fix).

Timeline

2022-09-07Published
2022-09-07Package advisory PYSEC-2022-43179
2022-10-11Package advisory GHSA-j4j9-7hg9-97g6
2026-06-17Record last changed
2026-11-30EPSS when our history starts: 0.46%
2026-12-06Code-level analysis added

Affected packages

AdvisoryPackageFixed in
GHSA-j4j9-7hg9-97g6poetry (PyPI)1.1.9
PYSEC-2022-43179poetry (PyPI)1.1.9

Also known as: GHSA-j4j9-7hg9-97g6, PYSEC-2022-43179

Related

CVEPublishedCVSSSummary
CVE-2026-411402026-04-248.7Poetry: Path traversal in tar extraction on Python 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4
CVE-2026-345912026-04-026.5Poetry Has Wheel Path Traversal Which Can Lead to Arbitrary File Write
CVE-2022-360692022-09-077.3Poetry Argument Injection vulnerability can lead to local Code Execution
CVE-2022-261842022-03-219.8same package: poetry (PyPI)
CVE-2026-1301642026-11-237.8Hermes Agent: Missing key validation for Bot Desktop screen environment file in non-local terminal backends
CVE-2026-1292342026-11-197.3NLTK: Untrusted search path in prover9/mace4 config allows local code execution via relative binary_location
CVE-2026-1281342026-11-137.8NLTK dot2img runs Graphviz 'dot' without the trusted-exec chokepoint, enabling local code execution via a writable PATH element
CVE-2026-1193332026-10-307.8draw.io Desktop allows Windows executable search-path hijacking

Add it to your agent

One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.

claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp

Then ask for triage_cve CVE-2022-36070, or call /api/v1/vulnerabilities/CVE-2022-36070. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.

NVD · CVE.org