pip known bugs

pypi

18 known bugs in pip, with affected versions, fixes and workarounds. Sourced from upstream issue trackers.

18
bugs
Known bugs
SeverityAffectedFixed inTitleStatusSource
highany19.2
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.
fixedosv:GHSA-gpvv-69j7-gwj8
highany1.3
Improper Input Validation in pip
pip before 1.3 uses HTTP to retrieve packages from the PyPI repository, and does not perform integrity checks on package contents, which allows man-in-the-middle attackers to execute arbitrary code via a crafted response to a "pip install" operation.
fixedosv:GHSA-g3p5-fjj9-h8gj
highany1.5
Improper Authentication in pip
The mirroring support (-M, --use-mirrors) in Python Pip before 1.5 uses insecure DNS querying and authenticity checks which allows attackers to perform man-in-the-middle attacks.
fixedosv:GHSA-c5h8-cq4v-cvfm
highany21.1
Improper Input Validation in pip
A flaw was found in python-pip in the way it handled Unicode separators in git references. A remote attacker could possibly use this issue to install a different revision on a repository. The highest threat from this vulnerability is to data integrity. This is fixed in python-pip version 21.1.
fixedosv:GHSA-5xp3-jfq3-5q8x
mediumany23.3
PYSEC-2023-228: advisory
When installing a package from a Mercurial VCS URL (ie "pip install hg+...") with pip prior to v23.3, the specified Mercurial revision could be used to inject arbitrary configuration options to the "hg clone" call (ie "--config"). Controlling the Mercurial configuration can modify how and which repository is installed. This vulnerability does not affect users who aren't installing from Mercurial.
fixedosv:PYSEC-2023-228
mediumany21.1
PYSEC-2021-437: advisory
A flaw was found in python-pip in the way it handled Unicode separators in git references. A remote attacker could possibly use this issue to install a different revision on a repository. The highest threat from this vulnerability is to data integrity. This is fixed in python-pip version 21.1.
fixedosv:PYSEC-2021-437
mediumanya4c735b14a62f9cb864533808ac63936704f2ace
PYSEC-2020-173: advisory
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.
fixedosv:PYSEC-2020-173
mediumany1.5
PYSEC-2019-160: advisory
The mirroring support (-M, --use-mirrors) in Python Pip before 1.5 uses insecure DNS querying and authenticity checks which allows attackers to perform man-in-the-middle attacks.
fixedosv:PYSEC-2019-160
medium1.36.0
PYSEC-2014-11: advisory
pip 1.3 through 1.5.6 allows local users to cause a denial of service (prevention of package installation) by creating a /tmp/pip-build-* file for another user.
fixedosv:PYSEC-2014-11
mediumany1.3
PYSEC-2013-9: advisory
pip before 1.3 allows local users to overwrite arbitrary files via a symlink attack on a file in the /tmp/pip-build temporary directory.
fixedosv:PYSEC-2013-9
mediumany1.3
PYSEC-2013-8: advisory
pip before 1.3 uses HTTP to retrieve packages from the PyPI repository, and does not perform integrity checks on package contents, which allows man-in-the-middle attackers to execute arbitrary code via a crafted response to a "pip install" operation.
fixedosv:PYSEC-2013-8
mediumany23.3
Command Injection in pip when used with Mercurial
When installing a package from a Mercurial VCS URL, e.g. `pip install hg+...`, with pip prior to v23.3, the specified Mercurial revision could be used to inject arbitrary configuration options to the `hg clone` call (e.g. `--config`). Controlling the Mercurial configuration can modify how and which repository is installed. This vulnerability does not affect users who aren't installing from Mercurial.
fixedosv:GHSA-mq26-g339-26xf
medium1.36.0
pip lack of randomness in build directory
pip 1.3 through 1.5.6 allows local users to cause a denial of service (prevention of package installation) by creating a `/tmp/pip-build-*` file for another user.
fixedosv:GHSA-53mr-44pp-crf4
mediumany25.3
pip's fallback tar extraction doesn't check symbolic links point to extraction directory
When extracting a tar archive pip may not check symbolic links point into the extraction directory if the tarfile module doesn't implement PEP 706. Note that upgrading pip to a "fixed" version for this vulnerability doesn't fix all known vulnerabilities that are remediated by using a Python version that implements PEP 706. Note that this is a vulnerability in pip's fallback implementation of tar extraction for Python versions that don't implement PEP 706 and therefore are not secure to all vulnerabilities in the Python 'tarfile' module. If you're using a Python version that implements PEP 706 then pip doesn't use the "vulnerable" fallback code. Mitigations include upgrading to a version of pip that includes the fix, upgrading to a Python version that implements PEP 706 (Python >=3.9.17, >=3.10.12, >=3.11.4, or >=3.12), applying the linked patch, or inspecting source distributions (sdists) before installation as is already a best-practice.
fixedosv:GHSA-4xh5-x5gv-qwph
mediumany1.3
Improper Link Resolution Before File Access in pip
pip before 1.3 allows local users to overwrite arbitrary files via a symlink attack on a file in the /tmp/pip-build temporary directory.
fixedosv:GHSA-4gv5-qhvr-36vv
mediumany25.2+echo.1
ECHO-ffe1-1d3c-d9bc: advisory
fixedosv:ECHO-ffe1-1d3c-d9bc
mediumany25.2+echo.1
ECHO-7db2-03aa-5591: advisory
fixedosv:ECHO-7db2-03aa-5591
lowany26.0
pip Path Traversal vulnerability
When pip is installing and extracting a maliciously crafted wheel archive, files may be extracted outside the installation directory. The path traversal is limited to prefixes of the installation directory, thus isn't able to inject or overwrite executable files in typical situations.
fixedosv:GHSA-6vgw-5pg2-w6jp
API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/bugs/pypi/pip
pip bugs — known issues per version | DepScope | DepScope