{"id":"CVE-2022-36070","published":"2022-09-07T18:30:14Z","modified":"2025-04-23T17:14:12Z","title":"Poetry's Untrusted Search Path can lead to Local Code Execution on Windows","vendor":"python-poetry","product":"poetry","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00362,"percentile":0.3074,"provenance":"source"},"cwes":[{"id":"CWE-426","name":"Untrusted Search Path"}],"references":[{"url":"https://github.com/python-poetry/poetry/releases/tag/1.1.9","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-poetry/poetry/security/advisories/GHSA-j4j9-7hg9-97g6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-poetry/poetry/releases/tag/1.2.0b1","tags":["x_refsource_MISC"]}],"priority":{"score":11.3,"factors":[{"name":"EPSS percentile","points":6.15},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"python-poetry","affectedVersions":[{"vendor":"python-poetry","product":"poetry","versions":["< 1.1.9"]}],"affected":[{"ecosystem":"PyPI","package":"poetry","vulnerableRanges":["<1.1.9"],"patched":["1.1.9"],"from":["GHSA-j4j9-7hg9-97g6","PYSEC-2022-43179"],"provenance":"source"}],"summary":{"text":"Poetry, the Python dependency manager, contains an untrusted search path flaw in how it invokes Git commands (such as git config) when handling dependencies from Git repositories, because it calls these executables by bare name rather than absolute path. An attacker who can get a malicious executable into the current working directory, which Windows searches before PATH, could achieve arbitrary code execution on the system, but this requires local access and a victim who takes a Poetry action on an untrusted directory or file, such as running it on a project containing a planted executable.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:55:04Z"},"euvd":{"id":"EUVD-2022-7111","exploited":false,"provenance":"source"}}