CVE-2022-36069Poetry Argument Injection vulnerability can lead to local Code Execution
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.
What to do
Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | poetry | Fix pending | UBUNTU-CVE-2022-36069 | |
| Ubuntu 26.04 | poetry | Under investigation | UBUNTU-CVE-2022-36069 | |
| Ubuntu 25.10 | poetry | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-36069 | |
| Ubuntu 24.04 | poetry | Under investigation | UBUNTU-CVE-2022-36069 | |
| Ubuntu 22.04 | poetry | Under investigation | UBUNTU-CVE-2022-36069 | |
| Debian 14 | poetry-core | Fixed | 1.0.7-1 | DEBIAN-CVE-2022-36069 |
| Debian 13 | poetry-core | Fixed | 1.0.7-1 | DEBIAN-CVE-2022-36069 |
| Debian 12 | poetry-core | Fixed | 1.0.7-1 | DEBIAN-CVE-2022-36069 |
| PyPI library | poetry | Fixed | 1.1.9 | PYSEC-2022-266 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- python-poetry poetry: affected: < 1.1.9
References
- https://github.com/python-poetry/poetry/security/advisories/GHSA-9xgj-fcgf-x6mw
- https://github.com/python-poetry/poetry/releases/tag/1.1.9
- https://github.com/python-poetry/poetry/releases/tag/1.2.0b1
- https://www.sonarsource.com/blog/securing-developer-tools-package-managers/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.