Path traversal in Python PIP installation package



Published: 2020-09-04 | Updated: 2020-11-23
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2019-20916
CWE-ID CWE-22
Exploitation vector Network
Public exploit N/A
Vulnerable software
Subscribe
py-pip
Other software / Other software solutions

Vendor www.pip-installer.org

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Path traversal

EUVDB-ID: #VU48600

Risk: Medium

CVSSv3.1: 5.7 [CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C]

CVE-ID: CVE-2019-20916

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

Exploit availability: No

Description

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing directory traversal sequences passed via URL to the install command within the _download_http_url() function in _internal/download.py. A remote attacker can send a specially crafted HTTP request with the Content-Disposition header that contains directory traversal characters in the filename and overwrite the /root/.ssh/authorized_keys file.

Mitigation

Install update from vendor's website.

Vulnerable software versions

py-pip: 19.0 - 19.1.1

External links

http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00005.html
http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00010.html
http://github.com/gzpan123/pip/commit/a4c735b14a62f9cb864533808ac63936704f2ace
http://github.com/pypa/pip/compare/19.1.1...19.2
http://github.com/pypa/pip/issues/6413
http://lists.debian.org/debian-lts-announce/2020/09/msg00010.html


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###