{"id":"CVE-2024-5642","summary":"Buffer overread when using an empty list with SSLContext.set_npn_protocols()","details":"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).","aliases":["BIT-libpython-2024-5642","BIT-python-2024-5642","BIT-python-min-2024-5642","PSF-2024-6"],"modified":"2026-05-01T04:26:20.296820Z","published":"2024-06-27T21:05:31.281Z","related":["ALSA-2025:23342","ALSA-2025:23530","CGA-wvq5-364w-25wg","SUSE-SU-2024:3076-1","SUSE-SU-2024:3351-1","SUSE-SU-2024:3353-1","SUSE-SU-2024:3470-1","openSUSE-SU-2024:14253-1","openSUSE-SU-2024:14256-1"],"database_specific":{"cna_assigner":"PSF","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5642.json"},"references":[{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2024/06/28/4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5642.json"},{"type":"ADVISORY","url":"https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html"},{"type":"ADVISORY","url":"https://mail.python.org/archives/list/security-announce@python.org/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5642"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20240726-0005/"},{"type":"REPORT","url":"https://github.com/python/cpython/issues/121227"},{"type":"FIX","url":"https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e"},{"type":"FIX","url":"https://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31"},{"type":"FIX","url":"https://github.com/python/cpython/pull/23014"},{"type":"PACKAGE","url":"https://github.com/python/cpython"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/python/cpython","events":[{"introduced":"0"},{"fixed":"39258d3595300bc7b952854c915f63ae2d4b9c3e"}]},{"type":"GIT","repo":"https://github.com/python/cpython","events":[{"introduced":"0"},{"fixed":"a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31"}]},{"type":"GIT","repo":"https://github.com/python/cpython","events":[{"introduced":"0"},{"fixed":"39258d3595300bc7b952854c915f63ae2d4b9c3e"}]}],"versions":["v0.9.8","v0.9.9","v1.0.1","v1.0.2","v1.1","v1.1.1","v1.2","v1.2b1","v1.2b2","v1.2b3","v1.2b4","v1.3","v1.3b1","v1.4","v1.4b1","v1.4b2","v1.4b3","v1.5","v1.5.1","v1.5.2","v1.5.2a1","v1.5.2a2","v1.5.2b1","v1.5.2b2","v1.5.2c1","v1.5a1","v1.5a2","v1.5a3","v1.5a4","v1.5b1","v1.5b2","v1.6a1","v1.6a2","v2.0","v2.0b1","v2.0b2","v2.0c1","v2.1","v2.1a1","v2.1a2","v2.1b1","v2.1b2","v2.1c1","v2.1c2","v2.2a3","v2.3c1","v2.3c2","v2.4","v2.4a1","v2.4a2","v2.4a3","v2.4b1","v2.4b2","v2.4c1","v3.0a1","v3.0a2","v3.0a3","v3.0a4","v3.0a5","v3.0b1","v3.0b2","v3.0b3","v3.0rc1","v3.0rc2","v3.0rc3","v3.1","v3.10.0a1","v3.10.0a7","v3.1a1","v3.1a2","v3.1b1","v3.1rc1","v3.1rc2","v3.2a1","v3.2a2","v3.2a3","v3.2a4","v3.2b1","v3.2b2","v3.2rc1","v3.2rc2","v3.2rc3","v3.3.0a2","v3.3.0a3","v3.3.0a4","v3.3.0b1","v3.3.0b2","v3.3.0rc1","v3.3.0rc2","v3.3.0rc3","v3.4.0a1","v3.4.0a2","v3.4.0a3","v3.4.0a4","v3.4.0b1","v3.4.0b2","v3.4.0b3","v3.5.0a1","v3.5.0a2","v3.5.0a3","v3.5.0a4","v3.5.0b1","v3.6.0a3","v3.6.0b1","v3.7.0a2","v3.9.0a2","v3.9.0b1","v3.9.0b3","v3.9.0b5","v3.9.11","v3.9.12","v3.9.13","v3.9.14","v3.9.15","v3.9.16","v3.9.17","v3.9.18","v3.9.19","v3.9.2","v3.9.20","v3.9.21","v3.9.22","v3.9.23","v3.9.2rc1","v3.9.5","v3.9.6","v3.9.7","v3.9.8","v3.9.9"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-5642.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L"}]}