Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pip
  4. ›
  5. CVE-2019-20916

CVE-2019-20916: Path Traversal in pip

June 9, 2021 (updated October 11, 2024)

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.

References

  • github.com/advisories/GHSA-gpvv-69j7-gwj8
  • github.com/gzpan123/pip/commit/a4c735b14a62f9cb864533808ac63936704f2ace
  • github.com/pypa/advisory-database/tree/main/vulns/pip/PYSEC-2020-173.yaml
  • github.com/pypa/pip
  • github.com/pypa/pip/compare/19.1.1...19.2
  • github.com/pypa/pip/issues/6413
  • lists.debian.org/debian-lts-announce/2020/09/msg00010.html
  • nvd.nist.gov/vuln/detail/CVE-2019-20916
  • www.oracle.com/security-alerts/cpuapr2022.html
  • www.oracle.com/security-alerts/cpujul2022.html

Code Behaviors & Features

Detect and mitigate CVE-2019-20916 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 19.2

Fixed versions

  • 19.2

Solution

Upgrade to version 19.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

pypi/pip/CVE-2019-20916.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:44 +0000.