Buffer overflow in Python

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.

Vulnerability class: Buffer Overflow

Published · last modified .

CVSS v2 metric

CVSS v2 base score 9.3 (High). Vector: AV:N/AC:M/Au:N/C:C/I:C/A:C. This CVE predates CVSS v3 and has no v3 score from NVD.

EPSS exploit prediction

EPSS: 0.063 (93.4th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 93rd percentile — 93.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2008-1887: held from 0.063 to 0.063.

EPSS over last 30 days · oldest: 0.063 · newest: 0.063 · change: 0.000

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2008-1887?
CVE-2008-1887 is a vulnerability in Python, classified under Buffer Copy without Checking Size of Input (Classic Buffer Overflow). Published 2008-04-18.
Is CVE-2008-1887 known to be exploited?
2 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.