CVE-2019-20916
python-pip: directory traversal in _download_http_url() function in src/pip/_internal/download.py
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 16, 2019
Updated · November 2, 2026
Description
A flaw was found in the pip package installer for Python when downloading or installing a remote package via a specified URL. Improper validation of the "Content-Disposition" HTTP response header makes a path traversal attack possible, leading to an arbitrary file overwrite. This flaw allows an attacker who controls a malicious server to execute arbitrary code on the system.
Statement
This issue has been rated as having Moderate impact because of the preconditions needed to trigger the flaw: it only affects Python Wheels and requires the user to pip-install a wheel from a malicious server. Installing software from untrusted servers is insecure by definition and strongly discouraged, as it may lead to system compromise regardless of this CVE.
This flaw did not affect the versions of python-pip in Python 3.8 as shipped with Red Hat Enterprise Linux 8 and Red Hat Software Collections 3, as they already included the fix for this CVE.
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
Avoid downloading or installing packages from potentially malicious servers via the command-line "pip download" or "pip install".
CVSS / CWE
CVSS 3.1 · 8CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory