Off-by-one in Python - CVE-2007-2052

 

Off-by-one in Python - CVE-2007-2052

Published: August 2, 2023 / Updated: June 3, 2025


Vulnerability identifier: #VU110168
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/U:Green
CVE-ID: CVE-2007-2052
CWE-ID: CWE-193
Exploitation vector: Remote access
Exploit availability: Public exploit is available
Vendor: Python.org
Affected software:
Python

Detailed vulnerability description

The vulnerability allows a remote non-authenticated attacker to gain access to sensitive information.

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.


How to mitigate CVE-2007-2052

Install update from vendor's website.

Sources