CVE-2013-7440: Medium severity Python Python vulnerability

Published May 26, 2015
·
Updated

It was found that Python's SSL hostname matching rules did not conform to RFC 6125 when the hostname included wildcards.

Upstream issue:

https://bugs.python.org/issue17997#msg194950

CVE assignment:

http://seclists.org/oss-sec/2015/q2/523

Upstream patch:

https://hg.python.org/cpython/rev/10d0edadbcdd

Other sources

The ssl.matchhostname function in CPython (aka Python) before 2.7.9 and 3.x before 3.3.3 does not properly handle wildcards in hostnames, which might allow man-in-the-middle attackers to spoof servers via a crafted certificate.

Affected Software

37 affected componentsFixes available
Python Python<=2.7.8
Python Python=3.0
Python Python=3.0.1
Python Python=3.1
Python Python=3.1.1
Python Python=3.1.2
Python Python=3.1.3
Python Python=3.1.4
Python Python=3.1.5
Python Python=3.1.2150
Python Python=3.2
Python Python=3.2-alpha
Python Python=3.2.0
Python Python=3.2.1
Python Python=3.2.2
Python Python=3.2.3
Python Python=3.2.4
Python Python=3.2.5
Python Python=3.2.6
Python Python=3.2.2150
Python Python=3.3
Python Python=3.3-beta2
Python Python=3.3.0
Python Python=3.3.1
Python Python=3.3.1-rc1
Python Python=3.3.2
redhat/python<2.7.9
2.7.9
redhat/python<3.3.3
3.3.3
redhat/python<3.4.0
3.4.0
redhat/python-backports-ssl_match_hostname<3.4.0.2
3.4.0.2
debian/python2.7<2.7.9-1
2.7.9-1
debian/python2.5
debian/python2.6
debian/python2.7
2.7.9-1
debian/python3.1
debian/python3.3
3.3.3-1
debian/python3.4
3.4~b1-4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 2.7.9
  2. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.3.3
  3. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.4.0
  4. Upgrade

    Upgrade redhat/python-backports-ssl_match_hostname to a version that resolves this vulnerability.

    Fixed in 3.4.0.2
  5. Upgrade

    Upgrade debian/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.9-1
  6. Upgrade

    Upgrade debian/python3.3 to a version that resolves this vulnerability.

    Fixed in 3.3.3-1
  7. Upgrade

    Upgrade debian/python3.4 to a version that resolves this vulnerability.

    Fixed in 3.4~b1-4
  8. Upgrade

    Upgrade Python to a version that resolves this vulnerability.

    Fixed in 2.7.9
  9. Upgrade

    Upgrade Python to a version that resolves this vulnerability.

    Fixed in 3.3.3

Event History

May 26, 2015
Data Sourced
11:52 AM
DescriptionSeverityAffected Software
Jun 7, 2016
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
Description
Data Sourced
06:59 PM
Weakness
Data Sourced
via OSV·06:59 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·06:59 PM
DescriptionSeverityWeaknessAffected Software
Oct 21, 2021
Data Sourced
via Red Hat·12:45 AM
DescriptionSeverityAffected Software
Oct 21, 2026
Data Sourced
via Microsoft·08:05 AM
DescriptionSeverityWeakness
Nov 24, 2026
Withdrawn
via OSV·04:28 AM

Frequently Asked Questions

1

What is the severity of CVE-2013-7440?

CVE-2013-7440 is considered a medium severity vulnerability due to its potential for man-in-the-middle attacks.

2

How do I fix CVE-2013-7440?

To fix CVE-2013-7440, upgrade to Python version 2.7.9 or 3.3.3 and above, which include the necessary patches.

3

Which versions of Python are affected by CVE-2013-7440?

CVE-2013-7440 affects Python versions prior to 2.7.9 and 3.x versions prior to 3.3.3.

4

What type of attack does CVE-2013-7440 allow?

CVE-2013-7440 allows attackers to perform man-in-the-middle attacks by spoofing a server with a crafted certificate.

5

Is CVE-2013-7440 specific to any operating system?

CVE-2013-7440 is found in CPython, affecting all operating systems where these vulnerable versions of Python are installed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203