Buffer overflow in Python - CVE-2008-3142

 

Buffer overflow in Python - CVE-2008-3142

Published: July 5, 2022 / Updated: June 3, 2025


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

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to read and manipulate data.

Multiple buffer overflows in Python 2.5.2 and earlier on 32bit platforms allow context-dependent attackers to cause a denial of service (crash) or have unspecified other impact via a long string that leads to incorrect memory allocation during Unicode string processing, related to the unicode_resize function and the PyMem_RESIZE macro.


Affected software

Python
Gentoo Linux
Ubuntu
python2.4 (Ubuntu package)
python2.4-minimal (Ubuntu package)
python2.5 (Ubuntu package)
python2.5-minimal (Ubuntu package)
dev-lang/python

How to mitigate CVE-2008-3142

Install update from vendor's website.

python2.4 (Ubuntu package) - addressed in versions 2.4.3-0ubuntu6.2, 2.4.4-2ubuntu7.2, 2.4.4-6ubuntu4.2, 2.4.5-1ubuntu4.1
python2.4-minimal (Ubuntu package) - addressed in versions 2.4.3-0ubuntu6.2, 2.4.4-2ubuntu7.2, 2.4.4-6ubuntu4.2, 2.4.5-1ubuntu4.1
python2.5 (Ubuntu package) - addressed in versions 2.5.1-0ubuntu1.2, 2.5.1-5ubuntu5.2, 2.5.2-2ubuntu4.1
python2.5-minimal (Ubuntu package) - addressed in versions 2.5.1-0ubuntu1.2, 2.5.1-5ubuntu5.2, 2.5.2-2ubuntu4.1
dev-lang/python - update to 2.5.2-r6

External References

Related Security Bulletins