Vulnerability
CVE-2024-5642
CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SSLContext.set_npn_protocols() which is an invalid value for the underlying OpenSSL API. This results in a buffer over-read when NPN is used (see CVE-2024-5535 for OpenSSL). This vulnerability is of low severity due to NPN being not widely used and specifying an empty list likely being uncommon in-practice (typically a protocol name would be configured).
25 advisories report this vulnerability, across 12 ecosystems.
Advisories
-
ALAS2-2025-2743
Amazon Linux 2 2017.12 - ALAS2-2025-2743: medium priority package update for python3
-
ALAS2-2025-2744
Amazon Linux 2 2017.12 - ALAS2-2025-2744: medium priority package update for python
-
ALSA-2025:23342
Moderate: python3.9 security update
-
ALSA-2025:23530
Important: python39:3.9 security update
- CGA-5fx2-wjp3-8fvc
- CGA-j978-3qf9-6mgg
-
CNA-CVE-2024-5642
Buffer overread when using an empty list with SSLContext.set_npn_protocols()
-
DEBIAN-CVE-2024-5642
CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SSLContext.set_npn_protocols() which is an invalid value for the underlying OpenSSL API. This results in a buffer over-read when NPN is used…
-
ELSA-2025-23342
ELSA-2025-23342: python3.9 security update (MODERATE)
-
ELSA-2025-23530
ELSA-2025-23530: python39:3.9 security update (IMPORTANT)
-
OESA-2025-2637
python3 security update
-
OESA-2025-2638
python3 security update
-
RHSA-2025:23342
Red Hat Security Advisory: python3.9 security update
-
RHSA-2025:23530
Red Hat Security Advisory: python39:3.9 security update
-
RHVEX-CVE-2024-5642
python: Invalid value for OpenSSL API may cause Buffer over-read when NPN is used
-
RLSA-2025:23342
Moderate: python3.9 security update
-
RLSA-2025:23530
Important: python39:3.9 security update
-
SUSE-SU-2024:3076-1
Security update for python39
-
SUSE-SU-2024:3351-1
Security update for python3
-
SUSE-SU-2024:3353-1
Security update for python36
-
SUSE-SU-2024:3470-1
Security update for python3
-
SUSEVEX-CVE-2024-5642
CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SSLContext.set_npn_protocols() which is an invalid value for the underlying OpenSSL API. This results in a buffer over-read when NPN is used…
-
UBUNTU-CVE-2024-5642
CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SSLContext.set_npn_protocols() which is an invalid value for the underlying OpenSSL API. This results in a buffer over-read when NPN is used…
-
openSUSE-SU-2024:14253-1
python39-3.9.19-6.1 on GA media
-
openSUSE-SU-2024:14256-1
python38-3.8.19-7.1 on GA media
References
- http://www.openwall.com/lists/oss-security/2024/06/28/4
- https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e
- https://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31
- https://github.com/python/cpython/issues/121227
- https://github.com/python/cpython/pull/23014
- https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html
- https://mail.python.org/archives/list/[email protected]/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/
- https://security.netapp.com/advisory/ntap-20240726-0005/