Bug 968059 (CVE-2013-1629) - CVE-2013-1629 python-pip: insecure installation mechanism
Summary: CVE-2013-1629 python-pip: insecure installation mechanism
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: CVE-2013-1629
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 968060 968061
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-28 22:58 UTC by Vincent Danen
Modified: 2019-09-29 13:05 UTC (History)
2 users (show)

Fixed In Version: python-pip 1.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-29 04:21:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Vincent Danen 2013-05-28 22:58:52 UTC
It was reported [1],[2] that pip, a package installer for Python modules, would retrieve code to install in an insecure manner.  When pip is used to install a module, that code is retrieved from the internet and then, in the presence of setup.py, is executed.  If pip is used as root (e.g. "sudo pip install [module]"), then this code is executed with root permissions.  Because pip does not do TLS certificate verification, or package verification, it is trivial for an attacker to perform a MitM attack and cause the user attempting to install a module to execute arbitrary code.

As of version 1.3, pip provides SSL certificate verification over HTTPS [3],[4].


[1] https://github.com/pypa/pip/issues/425
[2] http://www.reddit.com/r/Python/comments/17rfh7/warning_dont_use_pip_in_an_untrusted_network_a/
[3] https://github.com/pypa/pip/pull/791/files
[4] http://www.pip-installer.org/en/latest/logic.html#ssl-certificate-verification

Comment 1 Vincent Danen 2013-05-28 23:00:10 UTC
Created python-pip tracking bugs for this issue

Affects: fedora-all [bug 968060]
Affects: epel-all [bug 968061]

Comment 2 Tim Flink 2013-05-29 03:50:10 UTC
python-pip 1.3 is already stable in all current fedora releases (17, 18, 19, rawhide) and el6.

python-pip upstream has a minimum python version requirement of 2.6, so the fix for el5 is a bit tougher but I'll take a look to see what's reasonable there.

Comment 3 Vincent Danen 2013-05-29 04:18:47 UTC
Thanks, Tim.  I realized that the manifest I looked at initially is out of date, so I looked at koji and just now realized that 1.3.1 is already in there.

If it's possible to fix in EPEL5, fantastic.  If it's not then it is what it is; looking at the changeset it's quite significant so might be understandably difficult.  Thank you for taking a look at it, however!

Comment 4 Vincent Danen 2013-05-29 04:21:00 UTC
Closing this bug as the epel5 tracker is sufficient for its purpose.

Comment 5 Tomas Hoger 2015-01-14 12:28:19 UTC
Upstream changelog lists this as fixed in 1.3:

SSL Cert Verification; Make https the default for PyPI access. Thanks James Cleveland, Giovanni Bajo, Marcus Smith and many others (PR #791, CVE-2013-1629).

https://pip.pypa.io/en/latest/news.html
https://github.com/pypa/pip/pull/791
https://github.com/pypa/pip/pull/789


Note You need to log in before you can comment on or make changes to this bug.