{"id":"CVE-2024-5642","state":"PUBLISHED","title":"Buffer overread when using an empty list with SSLContext.set_npn_protocols()","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).","publishedAt":"2024-06-27T21:05:31.281Z","updatedAt":"2026-07-31T14:06:47.138Z","severity":{"score":6.5,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","source":"CISA-ADP"},"assigner":"PSF","products":["Python Software Foundation CPython"],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.9.24","versionType":"python"},{"version":"3.10.0a1","status":"affected","lessThan":"3.10.0b1","versionType":"python"}],"repo":"https://github.com/python/cpython"}],"references":["https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html","https://github.com/python/cpython/pull/23014","https://mail.python.org/archives/list/security-announce@python.org/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/","https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e","http://www.openwall.com/lists/oss-security/2024/06/28/4","https://github.com/python/cpython/issues/121227","https://security.netapp.com/advisory/ntap-20240726-0005/","https://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/5xxx/CVE-2024-5642.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-5642","state":"PUBLISHED","datePublished":"2024-06-27T21:05:31.281Z","dateUpdated":"2026-07-31T14:06:47.138Z","assignerShortName":"PSF","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateReserved":"2024-06-04T18:40:21.539Z"},"containers":{"cna":{"title":"Buffer overread when using an empty list with SSLContext.set_npn_protocols()","descriptions":[{"lang":"en","value":"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":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.9.24","versionType":"python"},{"version":"3.10.0a1","status":"affected","lessThan":"3.10.0b1","versionType":"python"}],"repo":"https://github.com/python/cpython"}],"references":[{"url":"https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html","tags":["third-party-advisory"]},{"url":"https://github.com/python/cpython/pull/23014","tags":["mitigation"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/","tags":["vendor-advisory"]},{"url":"https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e","tags":["patch"]},{"url":"http://www.openwall.com/lists/oss-security/2024/06/28/4"},{"url":"https://github.com/python/cpython/issues/121227","tags":["issue-tracking"]},{"url":"https://security.netapp.com/advisory/ntap-20240726-0005/"},{"url":"https://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31","tags":["patch"]}],"providerMetadata":{"shortName":"PSF","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateUpdated":"2026-07-31T14:06:47.138Z"},"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":6.5,"attackVector":"NETWORK","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"LOW","privilegesRequired":"NONE","confidentialityImpact":"LOW"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-06-28T13:47:34.169947Z","id":"CVE-2024-5642","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-06T20:14:30.590Z"}},{"title":"CVE Program Container","references":[{"url":"https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html","tags":["third-party-advisory","x_transferred"]},{"url":"https://github.com/python/cpython/pull/23014","tags":["mitigation","x_transferred"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/","tags":["vendor-advisory","x_transferred"]},{"url":"https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e","tags":["patch","x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2024/06/28/4","tags":["x_transferred"]},{"url":"https://github.com/python/cpython/issues/121227","tags":["issue-tracking","x_transferred"]},{"url":"https://security.netapp.com/advisory/ntap-20240726-0005/","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T21:18:06.642Z"}}]}}}