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.
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-07 | Published |
| 2022-09-07 | Package advisory PYSEC-2022-43179 |
| 2022-10-11 | Package advisory GHSA-j4j9-7hg9-97g6 |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 0.46% |
| 2026-12-06 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-j4j9-7hg9-97g6 | poetry (PyPI) | 1.1.9 |
| PYSEC-2022-43179 | poetry (PyPI) | 1.1.9 |
Also known as: GHSA-j4j9-7hg9-97g6, PYSEC-2022-43179
Related
| CVE | Published | CVSS | Summary |
|---|---|---|---|
| CVE-2026-41140 | 2026-04-24 | 8.7 | Poetry: Path traversal in tar extraction on Python 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4 |
| CVE-2026-34591 | 2026-04-02 | 6.5 | Poetry Has Wheel Path Traversal Which Can Lead to Arbitrary File Write |
| CVE-2022-36069 | 2022-09-07 | 7.3 | Poetry Argument Injection vulnerability can lead to local Code Execution |
| CVE-2022-26184 | 2022-03-21 | 9.8 | same package: poetry (PyPI) |
| CVE-2026-130164 | 2026-11-23 | 7.8 | Hermes Agent: Missing key validation for Bot Desktop screen environment file in non-local terminal backends |
| CVE-2026-129234 | 2026-11-19 | 7.3 | NLTK: Untrusted search path in prover9/mace4 config allows local code execution via relative binary_location |
| CVE-2026-128134 | 2026-11-13 | 7.8 | NLTK dot2img runs Graphviz 'dot' without the trusted-exec chokepoint, enabling local code execution via a writable PATH element |
| CVE-2026-119333 | 2026-10-30 | 7.8 | draw.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.