# CVE-2022-36069: Poetry Argument Injection can lead to Local Code Execution

Source: https://junglewise.ai/threats/cve-2022-36069-poetry-argument-injection-can-lead-to-local-code-execution  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-09-07  
License: CC BY 4.0 with a link back

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

Poetry is a dependency manager for Python. When handling dependencies that come from a Git repository instead of a registry, Poetry uses various commands, such as `git clone`. These commands are constructed using user input (e.g. the repository URL). When building the commands, Poetry correctly avoids Command Injection vulnerabilities by passing an array of arguments instead of a command string. However, there is the possibility that a user input starts with a dash (`-`) and is therefore treated as an optional argument instead of a positional one. This can lead to Code Execution because some of the commands have options that can be leveraged to run arbitrary executables. 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, because the exploit still works when the victim tries to make sure nothing can happen, e.g. by vetting any Git or Poetry config files that might be present in the directory. 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-36069 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-36069 being exploited in the wild.

**How severe is CVE-2022-36069?** 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-36069?** 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-36069?** 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-36069
- GHSA-9xgj-fcgf-x6mw
- PYSEC-2022-266

## 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 vulnerable to Untrusted Search Path leading to Local Code Execution on Windows](https://junglewise.ai/threats/cve-2022-36070-poetry-vulnerable-to-untrusted-search-path-leading-to-local-code)
- [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)
