CVE-2008-1887
CVE-2008-1887 is a critical-severity vulnerability in Python with a CVSS 2.0 base score of 9.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-120.
Key facts
- Severity: Critical (CVSS 2.0 base score 9.3)
- EPSS exploit prediction: 6% (93rd percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-120
- Affected product: Python
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is CVE-2008-1887?
- 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.
- How severe is CVE-2008-1887?
- CVE-2008-1887 has a CVSS 2.0 base score of 9.3, rated critical severity.
- Is CVE-2008-1887 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 6% (93rd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2008-1887?
- CVE-2008-1887 primarily affects Python. In total, 6 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2008-1887?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2008-1887 published?
- CVE-2008-1887 was published on 2008-04-18 and last updated on 2026-06-16.
References
- http://bugs.python.org/issue2587
- http://lists.apple.com/archives/security-announce/2009/Feb/msg00000.html
- http://lists.opensuse.org/opensuse-security-announce/2008-08/msg00006.html
- http://secunia.com/advisories/29889
- http://secunia.com/advisories/30872
- http://secunia.com/advisories/31255
- http://secunia.com/advisories/31365
- http://secunia.com/advisories/31518
- http://secunia.com/advisories/31687
- http://secunia.com/advisories/33937
- http://secunia.com/advisories/37471
- http://security.gentoo.org/glsa/glsa-200807-01.xml
- http://support.apple.com/kb/HT3438
- http://wiki.rpath.com/wiki/Advisories:rPSA-2009-0122
- http://www.debian.org/security/2008/dsa-1551
- http://www.debian.org/security/2008/dsa-1620
- http://www.novell.com/support/search.do?cmd=displayKC&docType=kc&externalId=InfoDocument-patchbuilder-readme5032900
- http://www.securityfocus.com/archive/1/490776
- http://www.securityfocus.com/archive/1/506056/100/0/threaded
- http://www.securityfocus.com/archive/1/507985/100/0/threaded
- http://www.securityfocus.com/bid/28749
- http://www.ubuntu.com/usn/usn-632-1
- http://www.vmware.com/security/advisories/VMSA-2009-0016.html
- http://www.vupen.com/english/advisories/2009/3316
- https://exchange.xforce.ibmcloud.com/vulnerabilities/41944
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10407
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A8624
Affected products (6)
- cpe:2.3:a:python:python:*:*:*:*:*:*:*:*
- cpe:2.3:o:canonical:ubuntu_linux:6.06:*:*:*:*:*:*:*
- cpe:2.3:o:canonical:ubuntu_linux:7.04:*:*:*:*:*:*:*
- cpe:2.3:o:canonical:ubuntu_linux:7.10:*:*:*:*:*:*:*
- cpe:2.3:o:canonical:ubuntu_linux:8.04:*:*:*:-:*:*:*
- cpe:2.3:o:debian:debian_linux:4.0:*:*:*:*:*:*:*
More vulnerabilities in Python
- CVE-2008-5031 — Critical (CVSS 10.0): Multiple integer overflows in Python 2.2.3 through 2.5.1, and 2.6, allow context-dependent attackers to have an unknown…
- CVE-2022-48565 — Critical (CVSS 9.8): An XML External Entity (XXE) issue was discovered in Python through 3.9.1. The plistlib module no longer accepts entity…
- CVE-2022-37454 — Critical (CVSS 9.8): The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and resultant buffer overflow…
- CVE-2021-29921 — Critical (CVSS 9.8): In Python before 3,9,5, the ipaddress library mishandles leading zero characters in the octets of an IP address string.…
- CVE-2021-3177 — Critical (CVSS 9.8): Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code…
- CVE-2020-27619 — Critical (CVSS 9.8): In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via…
Other CWE-120 (Classic Buffer Overflow) vulnerabilities
- CVE-2025-48611 — Critical (CVSS 10.0): In DeviceId of DeviceId.java, there is a possible desync in persistence due to a missing bounds check. This could lead…
- CVE-2026-24823 — Critical (CVSS 10.0): Out-of-bounds Write, Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') vulnerability in FASTSHIFT…
- CVE-2026-24810 — Critical (CVSS 10.0): Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') vulnerability in rethinkdb (src/cjson modules).…
- CVE-2026-24800 — Critical (CVSS 10.0): Out-of-bounds Write, Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') vulnerability in tildearrow…
- CVE-2025-9962 — Critical (CVSS 10.0): A buffer overflow vulnerability in Novakon P series allows attackers to gain root permission without prior…
- CVE-2010-10016 — Critical (CVSS 10.0): BS.Player version 2.57 (build 1051) contains a vulnerability in its playlist import functionality. When processing .m3u…
Browse all CWE-120 (Classic Buffer Overflow) vulnerabilities →