CPython Vulnerability in Bytes Decoding with Unicode Escape
CVE-2025-4516
5.9MEDIUM
What is CVE-2025-4516?
A vulnerability exists in CPython when using the bytes.decode method with the 'unicode_escape' encoding and specific error handlers. If the 'unicode_escape' encoding or an error handler is not employed, the usage remains unaffected. To mitigate this vulnerability, users are encouraged to avoid using the error handler and instead implement a try-except block around the bytes.decode() call to catch any potential DecodeError exceptions.
Affected Version(s)
CPython 0 < 3.9.23
CPython 3.10.0 < 3.10.18
CPython 3.11.0 < 3.11.13