Vulnerabilities · 2008 · Python
CVE-2008-1887
Python vulnerability
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.
High priority: this vulnerability is rated critical and can be attacked over the network without a login.
Affected products
Python, Ubuntu Linux, Debian Linux. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Python runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- bugs.python.org/issue2587 · Exploit
- www.debian.org/security/2008/dsa-1551 · Patch
- www.debian.org/security/2008/dsa-1620 · Patch
- www.securityfocus.com/bid/28749 · Patch
- lists.apple.com/archives/security-announce/2009/Feb/msg00000.html · Third Party Advisory
- lists.opensuse.org/opensuse-security-announce/2008-08/msg00006.html · Third Party Advisory
- security.gentoo.org/glsa/glsa-200807-01.xml · Third Party Advisory
- support.apple.com/kb/HT3438 · Third Party Advisory
- nvd.nist.gov/vuln/detail/CVE-2008-1887
- cve.org/CVERecord?id=CVE-2008-1887
More vulnerabilities in Python products
CVE-2026-21441CVE-2025-66471CVE-2025-66418CVE-2025-50182CVE-2025-50181CVE-2025-48379CVE-2025-47273CVE-2025-13837All 231
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.