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

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

Affected products (6)

More vulnerabilities in Python

All CVEs affecting Python →

Other CWE-120 (Classic Buffer Overflow) vulnerabilities

Browse all CWE-120 (Classic Buffer Overflow) vulnerabilities →