PyPI: python

CVE-2013-4238

Safety vulnerability ID: SFTY-20130818-11045

Safety legacy ID: pyup.io-45663

Python versions 2.6.9, 2.7.7, 3.2.6, 3.3.6 and 3.4.1 include a fix for CVE-2013-4238: The ssl.match_hostname function in the SSL module in Python 2.6 through 3.4 does not properly handle a '\0' character in a domain name in the Subject Alternative Name field of an X.509 certificate, which allows man-in-the-middle attackers to spoof arbitrary SSL servers via a crafted certificate issued by a legitimate Certification Authority, a related issue to CVE-2009-2408. https://bugs.python.org/issue18709

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

Python versions 2.6.9, 2.7.7, 3.2.6, 3.3.6 and 3.4.1 include a fix for CVE-2013-4238: The ssl.match_hostname function in the SSL module in Python 2.6 through 3.4 does not properly handle a '\0' character in a domain name in the Subject Alternative Name field of an X.509 certificate, which allows man-in-the-middle attackers to spoof arbitrary SSL servers via a crafted certificate issued by a legitimate Certification Authority, a related issue to CVE-2009-2408. https://bugs.python.org/issue18709

Advisory

Python versions 2.6.9, 2.7.7, 3.2.6, 3.3.6 and 3.4.1 include a fix for CVE-2013-4238: The ssl.match_hostname function in the SSL module in Python 2.6 through 3.4 does not properly handle a '\0' character in a domain name in the Subject Alternative Name field of an X.509 certificate, which allows man-in-the-middle attackers to spoof arbitrary SSL servers via a crafted certificate issued by a legitimate Certification Authority, a related issue to CVE-2009-2408. https://bugs.python.org/issue18709

Affected Package

Affecting python package, versions<2.6.9>=2.7.0a0,<2.7.7>=3.2.0a0,<3.2.6>=3.3.0a0,<3.3.6>=3.4.0a0,<3.4.1

Also affects

---

How to Fix

Upgradepythonto2.6.92.7.73.2.63.3.63.4.1or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more