CVE-2018-20225
python-pip: when --extra-index-url option is used and package does not already exist in the public index, the installation of malicious package with arbitrary version number is possible.
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 28, 2020
Updated · June 28, 2026
Description
A vulnerability was found in python-pip due to a flaw in the --extra-index-url option, where it installs the version with the highest version number, even if the user intended to obtain a private package from a private index. Exploitation requires that the package does not already exist in the public index, allowing an attacker to place the package there with an arbitrary version number.
Statement
Although this issue affects versions of pip shipped with Red Hat Enterprise Linux, Red Hat Software Collections, and Red Hat CodeReady Workspaces, according to the pip documentation, this behavior is intentional when using the --extra-index-url flag, as pip installs the version with the highest version number. As such, Red Hat Product Security has classified this as a low-severity issue, given that it is the intended functionality of pip and requires specific conditions for potential exploitation.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To protect from any unintended behavior, use --index-url and do not use --extra-index-url OR explicitly set --index-url and use --extra-index-url.
CVSS / CWE
CVSS 3.1 · 7.8CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE-348 · Use of Less Trusted Source