Remote code execution in pip



Published: 2020-05-08 | Updated: 2024-04-15
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2018-20225
CWE-ID CWE-19
Exploitation vector Network
Public exploit N/A
Vulnerable software
Subscribe
pip
Universal components / Libraries / Programming Languages & Components

Vendor Python Packaging Authority

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Data Handling

EUVDB-ID: #VU88540

Risk: Medium

CVSSv3.1: 6.5 [CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2018-20225

CWE-ID: CWE-19 - Data Handling

Exploit availability: No

Description

The vulnerability allows a remote attacker to compromise the affected system.

The issue exists due to the way pip handles software versioning during installation with --extra-index-url option enabled, which results in the version with the highest version number to be installed, even if the user had intended to obtain a private package from a private index. A remote attacker compromise the repository and force installation of a malicious package.

Mitigation

Install updates from vendor's website.

Vulnerable software versions

pip: 0.3 - 23.3.1

External links

http://cowlicks.website/posts/arbitrary-code-execution-from-pips-extra-index-url.html
http://bugzilla.redhat.com/show_bug.cgi?id=1835736


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###