Critical Vulnerability in Python Pip: Insecure Package Installation via Extra Index URL

python-pip Updated 03 Oct 2025

Summary

08/05/2020
N/A
No i
High
7.8

UBUNTU-CVE-2018-20225: 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. Affects python-pip versions 1.4.1-2 – 1.5.4-1ubuntu4+esm5. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Python Pip is a package management system used to install and manage software packages written in Python. It allows users to install packages from the Python Package Index (PyPI) and other repositories. Pip is widely used in the Python community for its ease of use and extensive library support. However, it has been found to have a critical vulnerability that affects its ability to securely handle package installations when using the --extra-index-url option.

Vulnerability Detail

An issue was discovered in pip (all versions) that allows it to install the version with the highest version number from a public index, even if the user intended to obtain a private package from a private index. This vulnerability arises when the --extra-index-url option is used, and it can lead to exploitation if an attacker places a malicious package in the public index with an arbitrary version number. This could result in users inadvertently installing compromised packages, leading to potential data breaches or system compromises.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users should avoid using the --extra-index-url option or ensure that the private package they intend to install does not have a version number that could be outnumbered by a public package. Additionally, consider using virtual environments to isolate package installations.

Conclusion

The vulnerability in Python Pip poses a significant risk to users who utilize the --extra-index-url option for package installations. It is crucial to update to the latest patched version and to follow best practices for package management to ensure security. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for python-pip →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.8, indicating a high severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground at Vulert Scanner without any signup.

All versions of Python Pip are affected by this vulnerability, particularly those that utilize the --extra-index-url option.

The potential consequences include the installation of malicious packages, leading to data breaches, system compromises, and loss of user trust.

Yes, patched versions of Python Pip are available. Users should update to the latest version to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for python-pip.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback