CVE-2019-20916
Path Traversal in pip
Reported by mitre · Published September 4, 2020
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python2-pip | Amazon Linux | 20.2.2-1.amzn2.0.2 |
| python3-pip | Amazon Linux | 20.2.2-1.amzn2.0.2 |
| pip | pypa | 19.2 |
| python-pip | Ubuntu:18.04:LTS | 9.0.1-2.3~ubuntu1.18.04.4 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| pypa | pip | |
| amazon:2 | python2-pip | 0 |
| amazon:2 | python3-pip | 0 |
| n/a | n/a | * |
| amazon:2 | python-pip-wheel | 0 |
| PyPI | pip | 0 |
Timeline
- Sep 4, 2020 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Mar 6, 2026 Distribution Patch (36 in total, the first dated here)
- Mar 6, 2026 Security Advisory (51 in total, the first dated here)
- Sep 11, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2019-20916
vulnetix vdb fixes CVE-2019-20916
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2019-20916/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- [debian-lts-announce] 20200911 [SECURITY] [DLA 2370-1] python-pip security update mailing-listx_refsource_MLIST
- openSUSE-SU-2020:1598 vendor-advisoryx_refsource_SUSE
- openSUSE-SU-2020:1613 vendor-advisoryx_refsource_SUSE
- x_refsource_MISC
- x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2019-20916 advisory
- https://github.com/advisories/GHSA-gpvv-69j7-gwj8 advisory
- https://github.com/pypa/advisory-database/tree/main/vulns/pip/PYSEC-2020-173.yaml advisory
- https://github.com/pypa/pip url