{"id":"CVE-2024-5642","aliases":["CVE-2024-5642","PSF-2024-6","BIT-LIBPYTHON-2024-5642","BIT-PYTHON-2024-5642","BIT-PYTHON-MIN-2024-5642"],"related":[],"kind":"vulnerability","state":"published","title":"Buffer overread when using an empty list with SSLContext.set_npn_protocols()","summary":"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).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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).","source":"cvelist"},{"lang":"es","text":"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).","source":"nvd"}],"published":"2024-06-27T21:05:31.281Z","modified":"2026-07-31T15:16:26.997Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","score":6.5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"python","introduced":"0","fixed":"3.9.24","status":"affected"},{"type":"python","introduced":"3.10.0a1","fixed":"3.10.0b1","status":"affected"}],"vendor":"Python Software Foundation","product":"CPython","repo":"https://github.com/python/cpython","source":"cvelist"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"39258d3595300bc7b952854c915f63ae2d4b9c3e"},{"type":"git","status":"affected","fixed":"a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31"}],"repo":"https://github.com/python/cpython","source":"psf"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.9.24"}],"ecosystem":"Bitnami","package":"libpython","purl":"pkg:bitnami/libpython","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.9.24"}],"ecosystem":"Bitnami","package":"python","purl":"pkg:bitnami/python","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.9.24"}],"ecosystem":"Bitnami","package":"python-min","purl":"pkg:bitnami/python-min","source":"bitnami"}],"references":[{"url":"https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/pull/23014","tags":["mitigation","web","x-transferred"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/","tags":["advisory","vendor-advisory","web","x-transferred"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e","tags":["fix","patch","web","x-transferred"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2024/06/28/4","tags":["web","x-transferred"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/issues/121227","tags":["issue-tracking","report","web","x-transferred"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20240726-0005/","tags":["web","x-transferred"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5642","tags":["web"],"sources":["bitnami"]}],"credits":[],"assigner":"PSF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-28T13:47:34.169Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-5642","url":"https://www.cve.org/CVERecord?id=CVE-2024-5642","licence":"CVE Terms of Use","modified":"2026-07-31T14:06:47.138Z"},{"source":"psf","name":"Python Software Foundation","id":"PSF-2024-6","url":"https://osv.dev/vulnerability/PSF-2024-6","licence":"CC-BY-4.0","modified":"2025-10-09T01:04:27.603Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-5642","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5642","licence":"Public domain","modified":"2026-07-31T15:16:26.997Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-LIBPYTHON-2024-5642","url":"https://osv.dev/vulnerability/BIT-LIBPYTHON-2024-5642","licence":"Apache-2.0","modified":"2025-10-14T09:53:39.450Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PYTHON-2024-5642","url":"https://osv.dev/vulnerability/BIT-PYTHON-2024-5642","licence":"Apache-2.0","modified":"2025-10-14T09:53:39.450Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PYTHON-MIN-2024-5642","url":"https://osv.dev/vulnerability/BIT-PYTHON-MIN-2024-5642","licence":"Apache-2.0","modified":"2025-10-14T09:53:39.450Z"}],"updatedAt":"2026-11-25T22:58:42.303Z","epss":{"score":0.01234,"percentile":0.69022,"date":"2026-11-30T12:00:22.000Z"}}