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 package | Versions | Reported by |
|---|---|---|
| Python Software Foundation CPython | before 3.9.24, from 3.10.0a1 before 3.10.0b1 | CVE List |
| https://github.com/python/cpython | before 39258d3595300bc7b952854c915f63ae2d4b9c3e, before a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31 | Python Software Foundation |
| libpython (Bitnami) | before 3.9.24 | Bitnami Vulnerability Database |
| python (Bitnami) | before 3.9.24 | Bitnami Vulnerability Database |
| python-min (Bitnami) | before 3.9.24 | Bitnami Vulnerability Database |
All scores
| CISA-ADP | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L |
| Bitnami Vulnerability Database | medium 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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-5642 changed 2026-07-31 | CVE Terms of Use |
| Python Software Foundation | PSF-2024-6 changed 2025-10-09 | CC-BY-4.0 |
| NVD | CVE-2024-5642 changed 2026-07-31 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPYTHON-2024-5642 changed 2025-10-14 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PYTHON-2024-5642 changed 2025-10-14 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PYTHON-MIN-2024-5642 changed 2025-10-14 | Apache-2.0 |