Skip to content
Fencer Vulns
high 7.5

CVE-2019-20916 json

Path Traversal in pip

published 2020-09-04 6 y ago modified 2026-06-17 4 mo ago also GHSA-gpvv-69j7-gwj8 , PYSEC-2020-173 , EUVD-2020-0138

cvss
7.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
3.0%
EPSS 3.0% chance of exploitation in 30 days, percentile 87%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi pip 19.2
  • pypa pip 19.2
  • python-pip Debian 14, Debian 13, Debian 12 20.0.2-1

debian advisories DEBIAN-CVE-2019-20916

  • python-pip Ubuntu 18.04 LTS 9.0.1-2.3~ubuntu1.18.04.4

ubuntu advisories UBUNTU-CVE-2019-20916

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • rh-python36-python RHEL 3 SOFTWARE_COLLECTIONS 3.6.12-1.el6
  • rh-python36-python RHEL 3 SOFTWARE_COLLECTIONS 3.6.12-1.el7
  • rh-python36-python-pip RHEL 3 SOFTWARE_COLLECTIONS 9.0.1-5.el6
  • rh-python36-python-pip RHEL 3 SOFTWARE_COLLECTIONS 9.0.1-5.el7
  • rh-python36-python-libs RHEL 3 SOFTWARE_COLLECTIONS 3.6.12-1.el6
  • rh-python36-python-libs RHEL 3 SOFTWARE_COLLECTIONS 3.6.12-1.el7
  • rh-python36-python-test RHEL 3 SOFTWARE_COLLECTIONS 3.6.12-1.el6
  • rh-python36-python-test RHEL 3 SOFTWARE_COLLECTIONS 3.6.12-1.el7

red hat advisories RHSA-2020:4285RHSA-2022:5234RHSA-2020:4273RHSA-2020:4654RHSA-2020:4432

  • python-pip SLE Real Time 15 SP2, SLE Module for Python 2 15 SP3, SLE Module for Basesystem 15 SP3 +10 more 20.0.2-150100.6.18.1
  • python-pip-wheel SLES for SAP 15 SP2, SLES for SAP 15 SP1, SLES 15 SP2-LTSS +5 more 20.0.2-150100.6.18.1
  • python39-setuptools SLE Module for Basesystem 15 SP3 44.1.1-7.3.1
  • python39-pip SLE Module for Basesystem 15 SP3 20.2.4-7.5.1
  • python3 SLE Module for Basesystem 15 SP2 3.6.12-3.75.1
  • python3-core SLE Module for Development Tools 15 SP2, SLE Module for Basesystem 15 SP2 3.6.12-3.75.1
  • python SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES for SAP 12 SP3 +14 more 2.7.17-28.64.1
  • python-base SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES for SAP 12 SP3 +15 more 2.7.17-28.64.1

suse advisories SUSE-SU-2023:0516-2SUSE-SU-2022:1454-1SUSE-FU-2021:2130-1SUSE-SU-2021:0529-1SUSE-SU-2021:0432-1SUSE-SU-2021:0428-1

  • python-setuptools openSUSE Tumbleweed 57.4.0-1.2
  • python36 openSUSE Tumbleweed 3.6.15-1.1
  • python38 openSUSE Tumbleweed 3.8.12-1.2
  • python openSUSE Tumbleweed 2.7.18-9.1
  • python-setuptools openSUSE Tumbleweed 70.0.0-1.1
  • python3 openSUSE Leap 15.2 3.6.12-lp152.4.17.1
  • python3-core openSUSE Leap 15.2 3.6.12-lp152.4.17.1
  • python3-documentation openSUSE Leap 15.2 3.6.12-lp152.4.17.1

opensuse advisories openSUSE-SU-2024:11272-1openSUSE-SU-2024:11284-1openSUSE-SU-2024:11285-1openSUSE-SU-2024:11551-1openSUSE-SU-2024:14029-1openSUSE-SU-2021:0331-1

  • python2-py AlmaLinux 8 1.5.3-6.module_el8.6.0+2781+fed64c13
  • python2-dns AlmaLinux 8 1.15.0-10.module_el8.6.0+2781+fed64c13
  • python2-idna AlmaLinux 8 2.5-7.module_el8.6.0+2781+fed64c13
  • python2-mock AlmaLinux 8 2.0.0-13.module_el8.6.0+2781+fed64c13
  • python2-pytz AlmaLinux 8 2017.2-12.module_el8.6.0+2781+fed64c13
  • python2-attrs AlmaLinux 8 17.4.0-10.module_el8.6.0+2781+fed64c13
  • python2-Cython AlmaLinux 8 0.28.1-7.module_el8.6.0+2781+fed64c13
  • python2-pluggy AlmaLinux 8 0.6.0-8.module_el8.6.0+2781+fed64c13

almalinux advisories ALSA-2020:4654

  • pytz Rocky Linux 8 2017.2-12.module+el8.5.0+706+735ec4b3
  • pytz Rocky Linux 8 2017.2-12.module+el8.4.0+403+9ae17a31
  • babel Rocky Linux 8 2.5.1-9.module+el8.4.0+403+9ae17a31
  • scipy Rocky Linux 8 1.0.0-20.module+el8.3.0+120+426d8baf
  • Cython Rocky Linux 8 0.28.1-7.module+el8.5.0+706+735ec4b3
  • Cython Rocky Linux 8 0.28.1-7.module+el8.4.0+403+9ae17a31
  • pytest Rocky Linux 8 3.4.2-13.module+el8.5.0+706+735ec4b3
  • pytest Rocky Linux 8 3.4.2-13.module+el8.4.0+403+9ae17a31

rocky linux advisories RLSA-2020:4654

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2019-20916 updated cvss 8.0

python-pip: directory traversal in _download_http_url() function in src/pip/_internal/download.py

  • Red Hat Enterprise Linux 7 python-pip, python3-pip
    affected: workaround, no fix planned “Avoid downloading or installing packages from potentially malicious servers via the command-line "pip download" or "pip install".”
  • Red Hat Enterprise Linux AppStream (v. 8) python3-pip 9.0.3-18.el8, babel 2.5.1-9.module+el8.1.0+3111+de3f2d8e, pytz 2017.2-12.module+el8.1.0+3111+de3f2d8e, PyYAML 3.12-16.module+el8.1.0+3111+de3f2d8e, scipy 1.0.0-20.module+el8.1.0+3323+7ac3e00f, Cython 0.28.1-7.module+el8.1.0+3111+de3f2d8e, +85 more
    fixed: vendor fix “Avoid downloading or installing packages from potentially malicious servers via the command-line "pip download" or "pip install".” RHSA-2020:4654
  • Red Hat Enterprise Linux BaseOS (v. 8) python-pip 9.0.3-18.el8, python3-pip-wheel 9.0.3-18.el8, platform-python-pip 9.0.3-18.el8
    fixed: vendor fix “Avoid downloading or installing packages from potentially malicious servers via the command-line "pip download" or "pip install".” RHSA-2020:4432
  • Red Hat Enterprise Linux Client Optional (v. 7) python-virtualenv 15.1.0-7.el7_9 Red Hat Enterprise Linux ComputeNode Optional (v. 7) python-virtualenv 15.1.0-7.el7_9 Red Hat Enterprise Linux Server (v. 7) python-virtualenv 15.1.0-7.el7_9 Red Hat Enterprise Linux Workstation (v. 7) python-virtualenv 15.1.0-7.el7_9
    fixed: vendor fix “Avoid downloading or installing packages from potentially malicious servers via the command-line "pip download" or "pip install".” RHSA-2022:5234
  • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-python36-python 3.6.12-1.el6, rh-python36-python-pip 9.0.1-5.el6, rh-python36-python-libs 3.6.12-1.el6, rh-python36-python-test 3.6.12-1.el6, rh-python36-python-tools 3.6.12-1.el6, rh-python36-python-tkinter 3.6.12-1.el6, +1 more Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) python27-python 2.7.18-2.el7, python27-tkinter 2.7.18-2.el7, python27-python-pip 8.1.2-6.el7, rh-python36-python 3.6.12-1.el7, python27-python-libs 2.7.18-2.el7, python27-python-test 2.7.18-2.el7, +8 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) python27-python 2.7.18-2.el7, python27-tkinter 2.7.18-2.el7, python27-python-pip 8.1.2-6.el7, rh-python36-python 3.6.12-1.el7, python27-python-libs 2.7.18-2.el7, python27-python-test 2.7.18-2.el7, +8 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) python27-python 2.7.18-2.el7, python27-tkinter 2.7.18-2.el7, python27-python-pip 8.1.2-6.el7, rh-python36-python 3.6.12-1.el7, python27-python-libs 2.7.18-2.el7, python27-python-test 2.7.18-2.el7, +8 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-python36-python 3.6.12-1.el6, rh-python36-python-pip 9.0.1-5.el6, rh-python36-python-libs 3.6.12-1.el6, rh-python36-python-test 3.6.12-1.el6, rh-python36-python-tools 3.6.12-1.el6, rh-python36-python-tkinter 3.6.12-1.el6, +1 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) python27-python 2.7.18-2.el7, python27-tkinter 2.7.18-2.el7, python27-python-pip 8.1.2-6.el7, rh-python36-python 3.6.12-1.el7, python27-python-libs 2.7.18-2.el7, python27-python-test 2.7.18-2.el7, +8 more
    fixed: vendor fix “Avoid downloading or installing packages from potentially malicious servers via the command-line "pip download" or "pip install".” RHSA-2020:4285
  • Red Hat Enterprise Linux 8 python38-pip, python39-pip, python3x-pip, python38-pip-wheel, python39-pip-wheel Red Hat Software Collections rh-python38-python-pip, rh-python38-python-pip-wheel
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

3.00% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/pypa/pip/issues/6413 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:P/A:N
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
pypi pip
<19.2
19.2

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.