Home / Python / Python / CVE-2008-5031
CVE-2008-5031: is it exploited, and which versions of Python are affected and fixed?
CVE-2008-5031 is a vulnerability in Python. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 08:08 UTC). Affected: python 2.2.3, python 2.3.7, python 2.4.6 and 1 more (NVD). No fixed version is listed in the sources yet; check the vendor advisory. Severity: High (10.0, CVSS 2.0, from NVD).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 08:08 UTC, CVE record November 19, 2026, 07:20 UTC and NVD November 19, 2026, 08:51 UTC.
What is CVE-2008-5031?
Multiple integer overflows in Python 2.2.3 through 2.5.1, and 2.6, allow context-dependent attackers to have an unknown impact via a large integer value in the tabsize argument to the expandtabs method, as implemented by (1) the string_expandtabs function in Objects/stringobject.c and (2) the unicode_expandtabs function in Objects/unicodeobject.c. NOTE: this vulnerability reportedly exists because of an incomplete fix for CVE-2008-2315.
From the CVE record by mitre, last updated August 7, 2024, 10:40 UTC.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| python | python | 2.2.3 | application |
| python | python | 2.3.7 | application |
| python | python | 2.4.6 | application |
| python | python | 2.5.1 | application |
NVD analysis (status Modified), last modified June 16, 2026, 22:59 UTC.
How severe is CVE-2008-5031?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 10.0 | CVSS 2.0 | AV:N/AC:L/Au:N/C:C/I:C/A:C | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2008-5031 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 2.99% probability of exploitation activity in the next 30 days, percentile 87.7 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
Where are the vendor advisories and references?
- http://svn.python.org/view/python/trunk/Objects/unicodeobject.c?rev=61350&view=diff&r1=61350&r2=61349&p1=python/trunk/Objects/unicodeobject.c&p2=/python/trunk/Objects/unicodeobject.c x_refsource_CONFIRM
- GLSA-200907-16 vendor-advisory, x_refsource_GENTOO
- 33937 third-party-advisory, x_refsource_SECUNIA
- http://scary.beasts.org/security/CESA-2008-008.html x_refsource_MISC
- 37471 third-party-advisory, x_refsource_SECUNIA
- [oss-security] 20081105 Re: CVE Request - Python string expandtabs mailing-list, x_refsource_MLIST
- [oss-security] 20081105 CVE Request - Python string expandtabs mailing-list, x_refsource_MLIST
- http://www.vmware.com/security/advisories/VMSA-2009-0016.html x_refsource_CONFIRM
- http://support.apple.com/kb/HT3438 x_refsource_CONFIRM
- http://svn.python.org/view?rev=61350&view=rev x_refsource_CONFIRM
- APPLE-SA-2009-02-12 vendor-advisory, x_refsource_APPLE
- 20091120 VMSA-2009-0016 VMware vCenter and ESX update release and vMA patch release address multiple security issue in third party components mailing-list, x_refsource_BUGTRAQ
- python-expandtabs-integer-overflow(46612) vdb-entry, x_refsource_XF
- oval:org.mitre.oval:def:8564 vdb-entry, signature, x_refsource_OVAL
- 35750 third-party-advisory, x_refsource_SECUNIA
- oval:org.mitre.oval:def:11280 vdb-entry, signature, x_refsource_OVAL
- http://svn.python.org/view/python/trunk/Objects/stringobject.c?rev=61350&view=diff&r1=61350&r2=61349&p1=python/trunk/Objects/stringobject.c&p2=/python/trunk/Objects/stringobject.c x_refsource_CONFIRM
- ADV-2009-3316 vdb-entry, x_refsource_VUPEN
When was it published, and where is the official record?
- Reserved
- November 10, 2008
- Published
- November 10, 2008, 16:00 UTC
- CVE record updated
- August 7, 2024, 10:40 UTC by mitre
- NVD
- Modified, last modified June 16, 2026, 22:59 UTC
- Last checked
- CVE list November 19, 2026, 07:20 UTC; NVD November 19, 2026, 08:51 UTC; KEV December 3, 2026, 08:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect Python?
- Aug 25, 2023CVE-2023-40217 Python: n/a
- Aug 23, 2023CVE-2023-41105 Python: untrusted Search Path
- Aug 22, 2023CVE-2022-48566 Python: race condition
- Aug 22, 2023CVE-2022-48565 Python: XML external entity (XXE)
- Aug 22, 2023CVE-2022-48564 Python: denial of service (uncontrolled resource consumption)
- Aug 22, 2023CVE-2022-48560 Python: use after free
- Aug 15, 2023CVE-2023-38898 Python: n/a disputed
- Jun 25, 2023CVE-2023-36632 Python: uncontrolled recursion disputed
Questions about CVE-2008-5031
Is CVE-2008-5031 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 08:08 UTC. FIRST's EPSS gives it a 2.99% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Python are affected by CVE-2008-5031?
python 2.2.3, python 2.3.7, python 2.4.6 and python 2.5.1, per the NVD. The tables above give every range the sources list.
Which version fixes CVE-2008-5031?
None of the sources (the CVE record, the NVD and GitHub's reviewed advisories) lists a fixed version yet. Check the vendor's advisory in the references.
How severe is CVE-2008-5031?
High (10.0, CVSS 2.0, from NVD). The severity table above shows each score with its source.
Where is the official record of CVE-2008-5031?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.