CVE-2024-5642
JSON

6.5medium

Buffer overread when using an empty list with SSLContext.set_npn_protocols()

Severity
6.5medium CVSS:3.1 by CISA-ADP
Exploit likelihood
1.23% (higher than 69% of CVEs)
Published
Last changed
Assigned by
PSF
Also known as
PSF-2024-6BIT-LIBPYTHON-2024-5642BIT-PYTHON-2024-5642BIT-PYTHON-MIN-2024-5642

Description

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).

Affected

Product or packageVersionsReported by
Python Software Foundation CPythonbefore 3.9.24, from 3.10.0a1 before 3.10.0b1CVE List
https://github.com/python/cpythonbefore 39258d3595300bc7b952854c915f63ae2d4b9c3e, before a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31Python Software Foundation
libpython (Bitnami)before 3.9.24Bitnami Vulnerability Database
python (Bitnami)before 3.9.24Bitnami Vulnerability Database
python-min (Bitnami)before 3.9.24Bitnami Vulnerability Database

All scores

CISA-ADP6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
Bitnami Vulnerability Databasemedium rating

Classification

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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).

NVD (es)

CPython 3.9 y versiones anteriores no permiten la configuración de una lista vacía ("[]") para SSLContext.set_npn_protocols(), que es un valor no válido para la API OpenSSL subyacente. Esto da como resultado una lectura excesiva del búfer cuando se utiliza NPN (consulte CVE-2024-5535 para OpenSSL). Esta vulnerabilidad es de baja gravedad debido a que NPN no se usa ampliamente y especificar una lista vacía probablemente sea poco común en la práctica (normalmente se configuraría un nombre de protocolo).

References

Sources

SourceRecordLicence
CVE ListCVE-2024-5642 changed 2026-07-31CVE Terms of Use
Python Software FoundationPSF-2024-6 changed 2025-10-09CC-BY-4.0
NVDCVE-2024-5642 changed 2026-07-31Public domain
Bitnami Vulnerability DatabaseBIT-LIBPYTHON-2024-5642 changed 2025-10-14Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-2024-5642 changed 2025-10-14Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-MIN-2024-5642 changed 2025-10-14Apache-2.0