CVE-2007-2052

Python 2.4 and 2.5 - Off-by-one Error in PyLocale_strxfrm

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2007-2052. PoCs published by Piotr Engelking.

AI-analyzed exploit summary This exploit demonstrates an information leak vulnerability in Python's 'PyLocale_strxfrm' function by setting a specific locale and calling 'strxfrm'. It confirms the issue by printing memory contents, which can be exploited to read portions of memory.

Description

Off-by-one error in the PyLocale_strxfrm function in Modules/_localemodule.c for Python 2.4 and 2.5 causes an incorrect buffer size to be used for the strxfrm function, which allows context-dependent attackers to read portions of memory via unknown manipulations that trigger a buffer over-read due to missing null termination.

Exploits (1)

exploitdb WORKING POC VERIFIED
by Piotr Engelking · pythonremotelinux
https://www.exploit-db.com/exploits/30018

This exploit demonstrates an information leak vulnerability in Python's 'PyLocale_strxfrm' function by setting a specific locale and calling 'strxfrm'. It confirms the issue by printing memory contents, which can be exploited to read portions of memory.

Classification
Working Poc 90%
Attack Type
Info Leak
Complexity
Trivial
Reliability
Reliable
Target: Python 2.4.4-2 and 2.5
No auth needed
Prerequisites: Python 2.4.4-2 or 2.5 installed · Locale 'pl_PL.UTF8' available on the system
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (38)

Core 38
Core References
Third Party Advisory mailing-list x_refsource_mlist
http://lists.vmware.com/pipermail/security-announce/2008/000005.html
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/28050
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/25190
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/25217
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/37471
Broken Link, Vendor Advisory x_refsource_confirm
http://www.python.org/download/releases/2.5.1/NEWS.txt
Third Party Advisory x_refsource_confirm
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416934
Third Party Advisory vendor-advisory x_refsource_debian
http://www.debian.org/security/2008/dsa-1551
Broken Link, Third Party Advisory x_refsource_confirm
http://www.vmware.com/security/advisories/VMSA-2009-0016.html
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/29303
Broken Link, Third Party Advisory vdb-entry x_refsource_vupen
http://www.vupen.com/english/advisories/2007/1465
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/29032
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/31492
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/469294/30/6450/threaded
Third Party Advisory vendor-advisory x_refsource_redhat
http://www.redhat.com/support/errata/RHSA-2008-0629.html
Third Party Advisory vendor-advisory x_refsource_redhat
http://www.redhat.com/support/errata/RHSA-2007-1077.html
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/488457/100/0/threaded
Third Party Advisory vendor-advisory x_refsource_redhat
http://www.redhat.com/support/errata/RHSA-2007-1076.html
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/507985/100/0/threaded
Broken Link, Third Party Advisory vdb-entry x_refsource_vupen
http://www.vupen.com/english/advisories/2008/0637
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/25353
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/25233
Third Party Advisory x_refsource_confirm
https://issues.rpath.com/browse/RPL-1358
Third Party Advisory vendor-advisory x_refsource_ubuntu
http://www.ubuntu.com/usn/usn-585-1
Third Party Advisory vendor-advisory x_refsource_trustix
http://www.trustix.org/errata/2007/0019/
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/28027
Third Party Advisory vendor-advisory x_refsource_suse
http://www.novell.com/linux/security/advisories/2007_13_sr.html
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/31255
Third Party Advisory vendor-advisory x_refsource_debian
http://www.debian.org/security/2008/dsa-1620
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/25787
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/23887
Broken Link, Third Party Advisory vdb-entry x_refsource_vupen
http://www.vupen.com/english/advisories/2009/3316
Broken Link, Third Party Advisory vendor-advisory x_refsource_mandriva
http://www.mandriva.com/security/advisories?name=MDKSA-2007:099
Broken Link third-party-advisory x_refsource_secunia
http://secunia.com/advisories/29889

Scores

EPSS 0.1248
EPSS Percentile 95.7%

Details

CWE
CWE-193
Status published
Products (2)
python/python 2.4.0
python/python 2.5.0
Published Apr 16, 2007
Tracked Since Feb 18, 2026