# CVE-2022-36070: Poetry vulnerable to Untrusted Search Path leading to Local Code Execution on Windows

Source: https://junglewise.ai/threats/cve-2022-36070-poetry-vulnerable-to-untrusted-search-path-leading-to-local-code  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-09-07  
License: CC BY 4.0 with a link back

CVE-2022-36070 · Severity: low · CVSS 3.1 · Published 2022-09-07

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, because the behavior is undocumented. Versions 1.1.9 and 1.2.0b1 contain patches for this issue.

Technologies: [poetry (PyPI)](https://junglewise.ai/threats/technologies/poetry). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2022-36070 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-36070 being exploited in the wild.

**How severe is CVE-2022-36070?** Low severity, with a CVSS score of 3.1, published 7 September 2022.

**Which products and versions are affected?** poetry (PyPI) ECOSYSTEM:introduced=0,fixed=1.1.9.

**Is there a fix for CVE-2022-36070?** Yes. poetry (PyPI): upgrade to 1.1.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-36070?** Check whether you run poetry (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- poetry (PyPI): upgrade to 1.1.9 or later

  ```sh
  pip install "poetry>=1.1.9"
  ```


## Affected products

- poetry (PyPI) ECOSYSTEM:introduced=0,fixed=1.1.9

## Identifiers

- CVE-2022-36070
- GHSA-j4j9-7hg9-97g6
- PYSEC-2022-43179

## Related threats

- [Poetry path traversal in sdist extraction](https://junglewise.ai/threats/cve-2026-41140-poetry-path-traversal-in-sdist-extraction)
- [python-poetry Poetry path traversal in wheel installer](https://junglewise.ai/threats/cve-2026-34591-python-poetry-poetry-path-traversal-in-wheel-installer)
- [Poetry Argument Injection can lead to Local Code Execution](https://junglewise.ai/threats/cve-2022-36069-poetry-argument-injection-can-lead-to-local-code-execution)
- [Poetry before v1.1.9 contains Untrusted Search Path](https://junglewise.ai/threats/cve-2022-26184-poetry-before-v1-1-9-contains-untrusted-search-path)
