Path Traversal in pip
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. A fix was committed 6704f2ace.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | pip | < 19.2 | 19.2 |
References
- https://github.com/pypa/pip/issues/6413
- https://github.com/gzpan123/pip/commit/a4c735b14a62f9cb864533808ac63936704f2ace
- https://github.com/pypa/pip/compare/19.1.1...19.2
- https://lists.debian.org/debian-lts-announce/2020/09/msg00010.html
- http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00005.html
- http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00010.html
- https://github.com/advisories/GHSA-gpvv-69j7-gwj8
- https://nvd.nist.gov/vuln/detail/CVE-2019-20916
- https://github.com/pypa/advisory-database/tree/main/vulns/pip/PYSEC-2020-173.yaml
- https://github.com/pypa/pip
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N- Weakness (CWE)
CWE-22- Platform
- Python (PyPI)
- Package
pip- Disclosed
- 04.09.2020
- Updated
- 11.10.2026 11:20
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2020-173 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-gpvv-69j7-gwj8 - CC BY 4.0
Vulnerability history: pip
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 13
- First → latest
- 08.2013 07.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 4
- Medium 8
- Low 1
Disclosures per year
- 2017: 0
- 2018: 0
- 2019: 1
- 2020: 1
- 2021: 1
- 2022: 0
- 2023: 1
- 2024: 0
- 2025: 1
- 2026: 5
earlier: 3
-
Path Traversal in pip this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.