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

poetry Updated 02 Oct 2025

Summary

11/10/2022
Yes i
High
7.3

CVE-2022-36070: Poetry vulnerable to Untrusted Search Path leading to Local Code Execution on Windows. Affects poetry versions < 1.1.9. Fixed in 1.1.9. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Poetry is a package manager for Python that helps developers manage project dependencies and packaging. It provides a command-line interface and a configuration file to define project settings and dependencies. Poetry allows developers to specify dependencies from Git repositories, which are handled by executing various commands. However, Poetry's handling of these commands can lead to the execution of untrusted code on Windows systems.

Vulnerability Detail

The vulnerability arises from the way Poetry calls executables by name when handling dependencies from Git. On Windows, the operating system searches for executables in the current directory first before looking in the paths defined in the PATH environment variable. This behavior can be exploited if a malicious file named git.exe is present in the current directory. When Poetry executes a command like git config, it may inadvertently execute the malicious git.exe instead of the intended executable. This can result in arbitrary code execution, allowing an attacker to take control of the system. The impact of this vulnerability includes the potential theft of credentials, persistence of access, and the ability to launch further attacks on internal systems.

How To Fix

Latest published version: 2.5.1 as of 23 Oct 2026

pip install --upgrade "poetry==2.5.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.1.9

This is the first release that contains the fix.

pip install --upgrade "poetry==1.1.9"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to upgrade to the patched versions of Poetry to mitigate the risk of local code execution.

Conclusion

The vulnerability in Poetry can lead to local code execution on Windows systems, potentially resulting in the takeover of the system and unauthorized access. It is important for developers to upgrade to the patched versions of Poetry (1.1.9 or 1.2.0b1) to mitigate this risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for poetry →

Share this vulnerability

FAQ

Poetry is a package manager for Python that helps developers manage project dependencies and packaging.

The vulnerability arises from the way Poetry calls executables by name when handling dependencies from Git. This can lead to the execution of untrusted code if a malicious file is present in the current directory.

The vulnerability can result in arbitrary code execution, allowing an attacker to take control of the system. This can lead to the theft of credentials, persistence of access, and further attacks on internal systems.

To fix this vulnerability, it is recommended to upgrade to version 1.1.9 or 1.2.0b1 of Poetry, which include a patch for the issue.

There is no known workaround for this vulnerability. It is crucial to upgrade to the patched versions of Poetry to mitigate the risk of local code execution.

Related vulnerabilities

Recent vulnerabilities recorded for poetry.

How To Fix

Latest published version: 2.5.1 as of 23 Oct 2026

pip install --upgrade "poetry==2.5.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.1.9

This is the first release that contains the fix.

pip install --upgrade "poetry==1.1.9"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback