Description
The HTTP clients in the (1) httplib, (2) urllib, (3) urllib2, and (4) xmlrpclib libraries in CPython (aka Python) 2.x before 2.7.9 and 3.x before 3.4.3, when accessing an HTTPS URL, do not (a) check the certificate against a trust store or verify that the server hostname matches a domain name in the subject's (b) Common Name or (c) subjectAltName field of the X.509 certificate, which allows man-in-the-middle attackers to spoof SSL servers via an arbitrary valid certificate.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 11 | python2.7 | 2.7.9-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 14.04 LTS | python2.7 | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7 | python +6 | 2.7.5-58.el7 | RHSA-2017:1868 |
| RHEL 2 | python27-mod_wsgi | 4.5.13-1.el6 | RHSA-2017:1162 |
| RHEL 2 | python27-python +6 | 2.7.13-3.el6 | RHSA-2017:1162 |
| RHEL 2 | python27-python-coverage | 3.6-4.el6 | RHSA-2017:1162 |
| RHEL 2 | python27-python-pip | 8.1.2-2.el6 | RHSA-2017:1162 |
| RHEL 2 | python27-python-setuptools | 0.9.8-4.el6 | RHSA-2017:1162 |
| RHEL 2 | python27-python-virtualenv | 13.1.0-2.el6 | RHSA-2017:1162 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | docbook5-style-xsl | No fix yet | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 7 | python +6 | 2.7.5-58.0.1.el7 | ELSA-2017-1868 |
Advisories 3
- RHSA-2017:1868 Red Hat Security Advisory: python security and bug fix update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2017:1162 Red Hat Security Advisory: python27 security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- ELSA-2017-1868 Moderate: python security and bug fix update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Aug 7, 2017
References
- RHSA-2017:1162 vendor-advisory
- https://www.python.org/dev/peps/pep-0476/
- 71639 vdb-entry
- RHSA-2016:1166 vendor-advisory
- RHSA-2017:1868 vendor-advisory
- http://bugs.python.org/issue22417
- GLSA-201503-10 vendor-advisory
- APPLE-SA-2015-08-13-2 vendor-advisory
- https://www.python.org/downloads/release/python-279/
- http://www.oracle.com/technetwork/topics/security/bulletinjan2015-2370101.html
- [oss-security] 20141211 CVE request: Python, standard library HTTP clients mailing-list
- https://support.apple.com/kb/HT205031
- http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html