Input validation error in Python - CVE-2013-4238

 

Input validation error in Python - CVE-2013-4238

Published: October 25, 2019 / Updated: June 3, 2025


Vulnerability identifier: #VU110148
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2013-4238
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to corrupt data.

The ssl.match_hostname function in the SSL module in Python 2.6 through 3.4 does not properly handle a '' 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.


Affected software

Python
Ubuntu
python2.6-minimal (Ubuntu package)
python2.6 (Ubuntu package)
python2.7 (Ubuntu package)
python2.7-minimal (Ubuntu package)
python3.2 (Ubuntu package)
python3.2-minimal (Ubuntu package)
python3.3 (Ubuntu package)
python3.3-minimal (Ubuntu package)

How to mitigate CVE-2013-4238

Install update from vendor's website.

python2.6-minimal (Ubuntu package) - update to 2.6.5-1ubuntu6.2
python2.6 (Ubuntu package) - update to 2.6.5-1ubuntu6.2
python2.7 (Ubuntu package) - addressed in versions 2.7.3-0ubuntu3.4, 2.7.3-5ubuntu4.3, 2.7.4-2ubuntu3.2
python2.7-minimal (Ubuntu package) - addressed in versions 2.7.3-0ubuntu3.4, 2.7.3-5ubuntu4.3, 2.7.4-2ubuntu3.2
python3.2 (Ubuntu package) - addressed in versions 3.2.3-0ubuntu3.5, 3.2.3-6ubuntu3.4
python3.2-minimal (Ubuntu package) - addressed in versions 3.2.3-0ubuntu3.5, 3.2.3-6ubuntu3.4
python3.3 (Ubuntu package) - addressed in versions 3.3.0-1ubuntu0.1, 3.3.1-1ubuntu5.2
python3.3-minimal (Ubuntu package) - addressed in versions 3.3.0-1ubuntu0.1, 3.3.1-1ubuntu5.2

External References

Related Security Bulletins