Buffer overflow in Python - CVE-2008-1887

 

Buffer overflow in Python - CVE-2008-1887

Published: June 27, 2022 / Updated: June 3, 2025


Vulnerability identifier: #VU110165
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2008-1887
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 execute arbitrary code.

Python 2.5.2 and earlier allows context-dependent attackers to execute arbitrary code via multiple vectors that cause a negative size value to be provided to the PyString_FromStringAndSize function, which allocates less memory than expected when assert() is disabled and triggers a buffer overflow.


Affected software

Python
Gentoo Linux
dev-lang/python

How to mitigate CVE-2008-1887

Install update from vendor's website.

dev-lang/python - update to 2.4.4-r13

External References

Related Security Bulletins