cve.bz

CVE-2019-20916 Path traversal

7.5 highExploit referenceEPSS 3.0%Fix available

High (7.5). EPSS 3.0% estimated probability of exploitation activity in the next 30 days. Fixed in pip 19.2.

On this page
The pip package before 19.2 for Python allows Directory Traversal when a URL is given in an install command, because a Content-Disposition header can have ../ in a filename, as demonstrated by overwriting the /root/.ssh/authorized_keys file. This occurs in _download_http_url in _internal/download.py.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
3.0% (unchanged from 3.0% a week ago; 3.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 88th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2019-20916 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2019-20916?via=ask-ai-copy and https://cve.bz/cve/CVE-2019-20916?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2019-20916 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
pypa:pipbefore 19.2
opensuse:leap15.1
opensuse:leap15.2
debian:debian_linux9.0
oracle:communications_cloud_native_core_network_function_cloud_native_environment1.10.0
oracle:communications_cloud_native_core_network_function_cloud_native_environment22.1.0
oracle:communications_cloud_native_core_policy1.15.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-gpvv-69j7-gwj8PyPIpip<19.219.2
PYSEC-2020-173PyPIpip<19.219.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9python-pip9.0.1-2+deb9u2DLA-2370-1
Debian12, 13, 14python-pip20.0.2-1DEBIAN-CVE-2019-20916
Ubuntu18.04:LTSpython-pip9.0.1-2.3~ubuntu1.18.04.4UBUNTU-CVE-2019-20916 USN-4601-1
UbuntuPro:14.04:LTS, Pro:16.04:LTSpython-pipno fix listedUBUNTU-CVE-2019-20916
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 morepython-virtualenv0:15.1.0-7.el7_9RHSA-2022:5234
Red Hatenterprise_linux:8::appstreamCython, python2-Cython, Cython-debugsource and 1 more0:0.28.1-7.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreamPyYAML, python2-pyyaml, PyYAML-debugsource and 1 more0:3.12-16.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreambabel, python2-babel0:2.5.1-9.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreamnumpy, python2-numpy, numpy-debugsource and 3 more1:1.14.2-13.module+el8.1.0+3323+7ac3e00fRHSA-2020:4654
Red Hatenterprise_linux:8::appstreampytest, python2-pytest0:3.4.2-13.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python2-PyMySQL0:0.8.0-10.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreampython-attrs, python2-attrs0:17.4.0-10.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreampython-backports, python2-backports0:1.0-15.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreampython-backports-ssl_match_hostname, python2-backports-ssl_match_hostname0:3.5.0.1-11.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreampython-chardet, python2-chardet0:3.0.4-10.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
Red Hatenterprise_linux:8::appstreampython-coverage, python2-coverage, python2-coverage-debuginfo and 1 more0:4.5.1-4.module+el8.1.0+3111+de3f2d8eRHSA-2020:4654
42 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Module for Containers 12 and 17 morepython-setuptools40.6.2-4.18.1SUSE-SU-2020:3594-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Module for Web and Scripting 12 and 16 morepython33.4.10-25.63.1SUSE-SU-2021:0344-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Module for Web and Scripting 12 and 16 morepython3, python3-base3.4.10-25.58.1SUSE-SU-2020:3596-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Module for Web and Scripting 12 and 16 morepython3-base3.4.10-25.63.2SUSE-SU-2021:0344-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 14 morepython, python-base2.7.17-28.64.1SUSE-SU-2021:0432-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 14 morepython, python-doc, python-base2.7.17-28.59.1SUSE-SU-2020:3765-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 14 morepython-doc2.7.17-28.64.3SUSE-SU-2021:0432-1
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-LTSS and 5 morepython-pip, python-pip-wheel20.0.2-150100.6.18.1SUSE-SU-2023:0516-2
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 12 morepython, python-base2.7.17-7.52.2SUSE-SU-2021:0355-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8, OpenStack Cloud Crowbar 8python-pip9.0.1-3.3.1SUSE-SU-2020:2726-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Module for Basesystem 15 SP1 and 5 morepython, python-base2.7.17-7.47.1SUSE-SU-2020:3597-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Module for Basesystem 15 SP1 and 5 morepython-pip10.0.1-3.3.1SUSE-SU-2020:2784-1
21 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.1python, python-doc, python-base2.7.17-lp151.10.29.1openSUSE-SU-2020:2189-1
openSUSELeap 15.1python-pip10.0.1-lp151.3.3.1openSUSE-SU-2020:1613-1
openSUSELeap 15.1python-pip, python-pip-wheel10.0.1-lp151.3.6.1openSUSE-SU-2020:2184-1
openSUSELeap 15.1python-setuptools, python-setuptools-test, python-setuptools-wheel40.5.0-lp151.2.3.1openSUSE-SU-2020:2185-1
openSUSELeap 15.1python3, python3-base3.6.12-lp151.6.27.1openSUSE-SU-2020:2190-1
openSUSELeap 15.2python, python-doc2.7.17-lp152.3.9.1openSUSE-SU-2020:2211-1
openSUSELeap 15.2python, python-doc, python-base2.7.17-lp152.3.12.1openSUSE-SU-2021:0270-1
openSUSELeap 15.2python-base2.7.17-lp152.3.9.2openSUSE-SU-2020:2211-1
openSUSELeap 15.2python-pip10.0.1-lp152.4.3.1openSUSE-SU-2020:1598-1
openSUSELeap 15.2python-pip, python-pip-wheel10.0.1-lp152.4.6.1openSUSE-SU-2020:2169-1
openSUSELeap 15.2python-setuptools, python-setuptools-test, python-setuptools-wheel40.5.0-lp152.3.3.1openSUSE-SU-2020:2143-1
openSUSELeap 15.2python3, python3-core, python3-documentation3.6.12-lp152.4.17.1openSUSE-SU-2021:0331-1
7 more for openSUSE in the JSON and on openSUSE's page.
AlmaLinux8python-sqlalchemy-doc1.3.2-2.module_el8.5.0+2569+5c5719bcALSA-2020:4654
AlmaLinux8python2-Cython0.28.1-7.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-PyMySQL0.8.0-10.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-attrs17.4.0-10.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-chardet3.0.4-10.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-coverage4.5.1-4.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-dns1.15.0-10.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-docs, python2-docs-info2.7.16-2.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-docutils0.14-12.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-funcsigs1.0.2-13.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-idna2.5-7.module_el8.6.0+2781+fed64c13ALSA-2020:4654
AlmaLinux8python2-ipaddress1.0.18-6.module_el8.6.0+2781+fed64c13ALSA-2020:4654
14 more for AlmaLinux in the JSON.
Rocky Linux8Cython0:0.28.1-7.module+el8.4.0+403+9ae17a31RLSA-2020:4654
Rocky Linux8Cython0:0.28.1-7.module+el8.5.0+706+735ec4b3RLSA-2020:4654
Rocky Linux8PyYAML0:3.12-16.module+el8.4.0+403+9ae17a31RLSA-2020:4654
Rocky Linux8PyYAML0:3.12-16.module+el8.5.0+706+735ec4b3RLSA-2020:4654
Rocky Linux8babel0:2.5.1-9.module+el8.4.0+403+9ae17a31RLSA-2020:4654
Rocky Linux8pytest0:3.4.2-13.module+el8.4.0+403+9ae17a31RLSA-2020:4654
Rocky Linux8pytest0:3.4.2-13.module+el8.5.0+706+735ec4b3RLSA-2020:4654
Rocky Linux8python-PyMySQL0:0.8.0-10.module+el8.3.0+120+426d8bafRLSA-2020:4654
Rocky Linux8python-PyMySQL0:0.8.0-10.module+el8.5.0+706+735ec4b3RLSA-2020:4654
Rocky Linux8python-attrs0:17.4.0-10.module+el8.4.0+403+9ae17a31RLSA-2020:4654
Rocky Linux8python-attrs0:17.4.0-10.module+el8.5.0+706+735ec4b3RLSA-2020:4654
Rocky Linux8python-chardet0:3.0.4-10.module+el8.4.0+403+9ae17a31RLSA-2020:4654
42 more for Rocky Linux in the JSON.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's 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.

Red Hat's mitigation

Avoid downloading or installing packages from potentially malicious servers via the command-line "pip download" or "pip install".

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7python-virtualenv-0:15.1.0-7.el7_9Fixed 2022-06-28RHSA-2022:5234
Red Hat Enterprise Linux 8python-pip-0:9.0.3-18.el8Fixed 2020-11-04RHSA-2020:4432
Red Hat Enterprise Linux 8python27:2.7-8030020200819165638.851f4228Fixed 2020-11-04RHSA-2020:4654
Red Hat Software Collections for Red Hat Enterprise Linux 6rh-python36-python-0:3.6.12-1.el6Fixed 2020-10-19RHSA-2020:4285
Red Hat Software Collections for Red Hat Enterprise Linux 6rh-python36-python-pip-0:9.0.1-5.el6Fixed 2020-10-19RHSA-2020:4285
Red Hat Software Collections for Red Hat Enterprise Linux 6rh-python36-python-virtualenv-0:15.1.0-3.el6Fixed 2020-10-19RHSA-2020:4285
Red Hat Software Collections for Red Hat Enterprise Linux 7python27-python-0:2.7.18-2.el7Fixed 2020-10-20RHSA-2020:4273
Red Hat Software Collections for Red Hat Enterprise Linux 7python27-python-pip-0:8.1.2-6.el7Fixed 2020-10-20RHSA-2020:4273
Red Hat Software Collections for Red Hat Enterprise Linux 7python27-python-virtualenv-0:13.1.0-4.el7Fixed 2020-10-20RHSA-2020:4273
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python36-python-0:3.6.12-1.el7Fixed 2020-10-19RHSA-2020:4285
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python36-python-pip-0:9.0.1-5.el7Fixed 2020-10-19RHSA-2020:4285
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python36-python-virtualenv-0:15.1.0-3.el7Fixed 2020-10-19RHSA-2020:4285
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUSpython27-python-0:2.7.18-2.el7Fixed 2020-10-20RHSA-2020:4273
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUSpython27-python-pip-0:8.1.2-6.el7Fixed 2020-10-20RHSA-2020:4273
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUSpython27-python-virtualenv-0:13.1.0-4.el7Fixed 2020-10-20RHSA-2020:4273
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUSrh-python36-python-0:3.6.12-1.el7Fixed 2020-10-19RHSA-2020:4285
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUSrh-python36-python-pip-0:9.0.1-5.el7Fixed 2020-10-19RHSA-2020:4285
Red Hat Enterprise Linux 7python-pipWill not fix
Red Hat Enterprise Linux 8python38:3.8/python3x-pipNot affected
Red Hat Software Collectionsrh-python38-python-pipNot affected
7 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2019-20916.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON