Skip to content
Noroxi
CVE-2008-1887· NVD / CVE Program· CNA mitre

Python 2.5.2 and earlier allows context-dependent attackers to execute arbitrary code via multiple vectors that cause a negative size value

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.

CriticalCVSS 9.3 · v2.0—No exploit Fix available
Published
Apr 18, 2008
Updated
Jun 16, 2026
EPSS
6.3% · 93th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

39

Monitor

Low priority for now.

CVSS
37 / 40 · 9.3 / 10
CISA KEV
0 / 30 · Not listed
EPSS
2 / 30 · 6.3%

Affected systems

VendorProduct
pythonpython
canonicalubuntu linux
debiandebian linux

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • canonical ubuntu linux6.06
  • canonical ubuntu linux7.04
  • canonical ubuntu linux7.10
  • canonical ubuntu linux8.04
  • debian debian linux4.0
  • python pythonup to 2.5.2 inclusive

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:4.0python2.4before 2.4.4-3+etch12.4.4-3+etch1
Debian:4.0python2.5before 2.5-5+etch12.5-5+etch1
Red Hat:enterprise_linux:3::aspythonbefore 0:2.2.3-6.110:2.2.3-6.11
Red Hat:enterprise_linux:3::aspython-debuginfobefore 0:2.2.3-6.110:2.2.3-6.11
Red Hat:enterprise_linux:3::aspython-develbefore 0:2.2.3-6.110:2.2.3-6.11
Red Hat:enterprise_linux:3::aspython-toolsbefore 0:2.2.3-6.110:2.2.3-6.11
Red Hat:enterprise_linux:3::astkinterbefore 0:2.2.3-6.110:2.2.3-6.11
Red Hat:enterprise_linux:4::aspythonbefore 0:2.3.4-14.7.el4_8.20:2.3.4-14.7.el4_8.2
Red Hat:enterprise_linux:4::aspython-debuginfobefore 0:2.3.4-14.7.el4_8.20:2.3.4-14.7.el4_8.2
Red Hat:enterprise_linux:4::aspython-develbefore 0:2.3.4-14.7.el4_8.20:2.3.4-14.7.el4_8.2
Red Hat:enterprise_linux:4::aspython-docsbefore 0:2.3.4-14.7.el4_8.20:2.3.4-14.7.el4_8.2
Red Hat:enterprise_linux:4::aspython-toolsbefore 0:2.3.4-14.7.el4_8.20:2.3.4-14.7.el4_8.2
Red Hat:enterprise_linux:4::astkinterbefore 0:2.3.4-14.7.el4_8.20:2.3.4-14.7.el4_8.2
Red Hat:enterprise_linux:5::clientpython-toolsbefore 0:2.4.3-24.el5_3.60:2.4.3-24.el5_3.6
Red Hat:enterprise_linux:5::clienttkinterbefore 0:2.4.3-24.el5_3.60:2.4.3-24.el5_3.6
Red Hat:enterprise_linux:5::client_workstationpythonbefore 0:2.4.3-24.el5_3.60:2.4.3-24.el5_3.6
Red Hat:enterprise_linux:5::client_workstationpython-debuginfobefore 0:2.4.3-24.el5_3.60:2.4.3-24.el5_3.6
Red Hat:enterprise_linux:5::client_workstationpython-develbefore 0:2.4.3-24.el5_3.60:2.4.3-24.el5_3.6

Other highest-scoring records for the same primary product.

  • CVE-2016-5636Integer overflow in the get_data function in zipimport.c in CPython (aka Python) before 2.7.12, 3.x before 3.4.5, and 3.5.x before 3.5.2 all
    47Plan
  • CVE-2007-4559Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile module in Python allows user-assisted remot
    47Plan
  • CVE-2021-3177Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Pyth
    46Plan
  • CVE-2014-4650The CGIHTTPServer module in Python 2.7.5 and 3.3.4 does not properly handle URLs in which URL encoding is used for path separators, which al
    46Plan
  • CVE-2018-1000802Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements used in a Command ('C
    45Plan
  • CVE-2020-27619In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP.
    42Plan

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
debian:python2.42.4.4-3+etch1 · Debian:4.0Package registry (OSV)
debian:python2.52.5-5+etch1 · Debian:4.0Package registry (OSV)
red hat:python0:2.4.3-24.el5_3.6 · Red Hat:enterprise_linux:5::client_workstationPackage registry (OSV)
red hat:python-debuginfo0:2.4.3-24.el5_3.6 · Red Hat:enterprise_linux:5::client_workstationPackage registry (OSV)
red hat:python-devel0:2.4.3-24.el5_3.6 · Red Hat:enterprise_linux:5::client_workstationPackage registry (OSV)
red hat:python-docs0:2.3.4-14.7.el4_8.2 · Red Hat:enterprise_linux:4::asPackage registry (OSV)
red hat:python-tools0:2.4.3-24.el5_3.6 · Red Hat:enterprise_linux:5::clientPackage registry (OSV)
red hat:tkinter0:2.4.3-24.el5_3.6 · Red Hat:enterprise_linux:5::clientPackage registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

    If successful

    Confidentiality
    C · data can be read
    Integrity
    C · data or configuration can be modified
    Availability
    C · the service can be disrupted
    Attack complexity
    M
    Confidentiality impact
    C
    Integrity impact
    C
    Availability impact
    C

    CVSS vector

    AV:N/AC:M/Au:N/C:C/I:C/A:C

    nvd-primary

    Root cause

    When data is copied, the source length is not compared with the size of the destination buffer. Excess data overwrites adjacent memory.

    A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

    Vulnerable

    c
    char buf[256];memcpy(buf, pkt->data, pkt->len);

    Fixed

    c
    char buf[256];if (pkt->len > sizeof(buf)) {  return -EINVAL;}memcpy(buf, pkt->data, pkt->len);

    Noroxi analysis

    No Noroxi analysis for this record yet

    We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

    We use this product, ask for help

    Change log

    1. Fix✗ → ✓

    For records you follow, these changes also arrive as notifications. →

    References

    All records