CVE-2022-36070: Poetry vulnerable to Untrusted Search Path leading to Local Code Execution on Windows
(updated )
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.
References
- github.com/advisories/GHSA-j4j9-7hg9-97g6
- github.com/pypa/advisory-database/tree/main/vulns/poetry/PYSEC-2022-43179.yaml
- github.com/python-poetry/poetry
- github.com/python-poetry/poetry/releases/tag/1.1.9
- github.com/python-poetry/poetry/releases/tag/1.2.0b1
- github.com/python-poetry/poetry/security/advisories/GHSA-j4j9-7hg9-97g6
- nvd.nist.gov/vuln/detail/CVE-2022-36070
Code Behaviors & Features
Detect and mitigate CVE-2022-36070 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →