CVE-2022-36070

CVE-2022-36070 is a high-severity security vulnerability in poetry (pip), affecting versions < 1.1.9. It is fixed in 1.1.9.

Summary

Observation

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. If the current directory contains unknown and thus potentially malicious files, the directory could contain an executable named git.exe which would be executed by Poetry.

Poetry calls executables by name when handling dependencies from Git. Note that there might be even more places where Poetry calls executables by name.

Remediation

Upgrade to version 1.1.9 || 1.2.0b1

References

Fix PR

For more information

If you have any questions or comments about this advisory:

Impact

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, because the exploit still works when the victim tries to make

sure nothing can happen, e.g. by checking that the referenced Git dependency is not malicious and points to a trusted Git repository.
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. This kind of attack vector has been used in the past to target security researchers by sending them projects to collaborate on, so we believe that there is a non-negligible risk.

CVE-2022-36070 has a CVSS score of 7.3 (High). The vector is requires local access, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.1.9); upgrading removes the vulnerable code path.

Affected versions

poetry (< 1.1.9)

Security releases

poetry → 1.1.9 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

1.1.9 || 1.2.0b1

Frequently Asked Questions

  1. What is CVE-2022-36070? CVE-2022-36070 is a high-severity security vulnerability in poetry (pip), affecting versions < 1.1.9. It is fixed in 1.1.9.
  2. How severe is CVE-2022-36070? CVE-2022-36070 has a CVSS score of 7.3 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of poetry are affected by CVE-2022-36070? poetry (pip) versions < 1.1.9 is affected.
  4. Is there a fix for CVE-2022-36070? Yes. CVE-2022-36070 is fixed in 1.1.9. Upgrade to this version or later.
  5. Is CVE-2022-36070 exploitable, and should I be worried? Whether CVE-2022-36070 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2022-36070 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2022-36070? Upgrade poetry to 1.1.9 or later.

Other vulnerabilities in poetry

Stop the waste.
Protect your environment with Kodem.