CVE-2018-20225 Supply chain in n/a
Attackers can hijack private package installations via public indexes when using --extra-index-url, leading to arbitrary code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2018-20225?
CVE-2018-20225 is a high-severity vulnerability in n/a, published on 8 May 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
An issue was discovered in pip (all versions) because it installs the version with the highest version number, even if the user had intended to obtain a private package from a private index. This only affects use of the --extra-index-url option, and exploitation requires that the package does not already exist in the public index (and thus the attacker can put the package there with an arbitrary version number). NOTE: it has been reported that this is intended functionality and the user is responsible for using --extra-index-url securely
Weakness: CWE-20
Which versions are affected by CVE-2018-20225?
It affects 1 product.
Products include Pypa Pip.
How do I fix CVE-2018-20225?
Change a configuration setting.
Is CVE-2018-20225 being exploited?
There is no known exploitation of CVE-2018-20225 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in n/a
- CVE-2013-1629 Improper Input Validation in pip
- CVE-2026-13346 pip absolute path traversal during download from malicious package indexes
- CVE-2023-5752 Mercurial configuration injectable in repo revision when installing via pip
- CVE-2026-8643 pip can extract console_scripts and gui_scripts outside installation directory
Sources
Also known as GHSA-7p5p-7qq5-cc86, MINI-4fr4-36h6-gcc5, ROOT-OS-DEBIAN-12-CVE-2018-20225, UBUNTU-CVE-2018-20225.