CVE-2022-26184: Poetry before v1.1.9 contains Untrusted Search Path
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.675%
CWE
Published
3/23/2022
Updated
10/21/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
poetry | pip | < 1.1.9 | 1.1.9 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how Poetry resolved the Git executable path on Windows. The pre-patch code in git.py
directly invoked 'git' commands without absolute path validation, making it susceptible to DLL search order hijacking. The fix introduced an executable()
function that securely resolves the full system path to git.exe
using Windows' where.exe
utility. The vulnerable Git.run()
method was modified to use this secure path resolution instead of relying on the ambient PATH variable, confirming this was the attack vector.