Bug 968059 - (CVE-2013-1629) CVE-2013-1629 python-pip: insecure installation mechanism
CVE-2013-1629 python-pip: insecure installation mechanism
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 968060 968061
  Show dependency treegraph
Reported: 2013-05-28 18:58 EDT by Vincent Danen
Modified: 2015-01-14 07:28 EST (History)
2 users (show)

See Also:
Fixed In Version: python-pip 1.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-05-29 00:21:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Vincent Danen 2013-05-28 18:58:52 EDT
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 19:00:10 EDT
Created python-pip tracking bugs for this issue

Affects: fedora-all [bug 968060]
Affects: epel-all [bug 968061]
Comment 2 Tim Flink 2013-05-28 23:50:10 EDT
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 00:18:47 EDT
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 00:21:00 EDT
Closing this bug as the epel5 tracker is sufficient for its purpose.
Comment 5 Tomas Hoger 2015-01-14 07:28:19 EST
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).


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