Poetry's Untrusted Search Path can lead to Local Code Execution on Windows
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-426.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| python-poetry | poetry | before 1.1.9 | 1.1.9 | Patch available | CNA |
| — | poetry (PyPI) | before 1.1.9 | 1.1.9 | Patch available | GHSA-j4j9-7hg9-97g6 |
- poetry Vendorpython-poetry Affected before 1.1.9 Fixed in 1.1.9 Patch available CNA
- poetry (PyPI) Vendor— Affected before 1.1.9 Fixed in 1.1.9 Patch available GHSA-j4j9-7hg9-97g6
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python-poetry:poetry:*:*:*:*:*:python:*:* | before 1.1.9 | Vulnerable | python-poetry |
| cpe:2.3:a:python-poetry:poetry:1.2.0:alpha1:*:*:*:python:*:* | 1.2.0 alpha1 | Vulnerable | python-poetry |
| cpe:2.3:a:python-poetry:poetry:1.2.0:alpha2:*:*:*:python:*:* | 1.2.0 alpha2 | Vulnerable | python-poetry |
| cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* | not specified by NVD | Running on | Microsoft |
- cpe:2.3:a:python-poetry:poetry:*:*:*:*:*:python:*:* Versions before 1.1.9 Vulnerable ·python-poetry
- cpe:2.3:a:python-poetry:poetry:1.2.0:alpha1:*:*:*:python:*:* Versions 1.2.0 alpha1 Vulnerable ·python-poetry
- cpe:2.3:a:python-poetry:poetry:1.2.0:alpha2:*:*:*:python:*:* Versions 1.2.0 alpha2 Vulnerable ·python-poetry
- cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* Versions not specified by NVD Running on ·Microsoft
Remediation
- Fix · CNA poetry (python-poetry) Fixed in 1.1.9
- Fix · GHSA-j4j9-7hg9-97g6 poetry (PyPI) Fixed in 1.1.9 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2022-36070
- 2026-10-03 Alias added: GHSA-j4j9-7hg9-97g6
References
Advisory 4
More python-poetry Poetry vulnerabilities
- TI-2022-16492 Poetry Argument Injection vulnerability can lead to local Code Execution CVSS 3.1HIGH 7.3
- TI-2026-26838 Poetry Has Wheel Path Traversal Which Can Lead to Arbitrary File Write CVSS 4.0HIGH 7.1
- TI-2022-09621 Poetry v1.1.9 and below was discovered to contain an untrusted search path which causes… CVSS 3.1CRITICAL 9.8
Sources
- CVE-2022-36070 · CVE Program
- CVE-2022-36070 · NVD
- FIRST EPSS
- GHSA-j4j9-7hg9-97g6 · GitHub Advisory Database · CC BY 4.0
- CVE-2022-36070 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences