CVE-2024-5642
published 2024-06-27CVE-2024-5642: 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…
PriorityP335medium6.5CVSS 3.1
AVNACLPRNUINSUCLINAL
EPSS
0.74%
50.6th percentile
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
6 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | pypy3 | < pypy3 7.3.10+dfsg-1 (bookworm) | pypy3 7.3.10+dfsg-1 (bookworm) |
| debian | python2.7 | < pypy3 7.3.10+dfsg-1 (bookworm) | pypy3 7.3.10+dfsg-1 (bookworm) |
| debian | python3.11 | < pypy3 7.3.10+dfsg-1 (bookworm) | pypy3 7.3.10+dfsg-1 (bookworm) |
| debian | python3.13 | < pypy3 7.3.10+dfsg-1 (bookworm) | pypy3 7.3.10+dfsg-1 (bookworm) |
| debian | python3.9 | < pypy3 7.3.10+dfsg-1 (bookworm) | pypy3 7.3.10+dfsg-1 (bookworm) |
| msrc | cbl2_python3_3.9.19-13_on_cbl_mariner_2.0 | — | — |
CVSS provenance
nvdv3.16.5MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
osv9.1CRITICAL
vendor_debian9.1CRITICAL
vendor_redhat9.1CRITICAL
vendor_msrc6.5MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
GHSA-hrvr-7x5w-xpmq: CPython 3
ghsa_unreviewed·2024-06-27·CVSS 9.1
CVE-2024-5642 [CRITICAL] GHSA-hrvr-7x5w-xpmq: CPython 3
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).
OSV
CVE-2024-5642: CPython 3
osv·2024-06-27·CVSS 9.1
CVE-2024-5642 [CRITICAL] CVE-2024-5642: CPython 3
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).
Red Hat
python: Invalid value for OpenSSL API may cause Buffer over-read when NPN is used
vendor_redhat·2024-06-27·CVSS 9.1
CVE-2024-5642 [CRITICAL] CWE-20 python: Invalid value for OpenSSL API may cause Buffer over-read when NPN is used
python: Invalid value for OpenSSL API may cause Buffer over-read when NPN is used
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).
A vulnerability was found in Python/CPython that does not disallow configuring an empty list ("[]") for SSLContext.set_npn_protocols(), which is an invalid value for the underlying OpenSSL API. This issue results in a buffer over-read when NPN is used. See CVE -2024-5535 for OpenS
Microsoft
Buffer overread when using an empty list with SSLContext.set_npn_protocols()
vendor_msrc·2024-06-11·CVSS 6.5
CVE-2024-5642 [MEDIUM] Buffer overread when using an empty list with SSLContext.set_npn_protocols()
Buffer overread when using an empty list with SSLContext.set_npn_protocols()
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
PSF: PSF
Customer Action Required: Yes
Debian
CVE-2024-5642: pypy3 - CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SS...
vendor_debian·2024·CVSS 9.1
CVE-2024-5642 [CRITICAL] CVE-2024-5642: pypy3 - CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SS...
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).
Scope: local
bookworm: resolved (fixed in 7.3.10+dfsg-1)
bullseye: open
forky: resolved (fixed in 7.3.10+dfsg-1)
sid: resolved (fixed in 7.3.10+dfsg-1)
trixie: resolved (fixed in 7.3.10+dfsg-1)
No detection rules found.
No public exploits indexed.
http://www.openwall.com/lists/oss-security/2024/06/28/4https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3ehttps://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31https://github.com/python/cpython/issues/121227https://github.com/python/cpython/pull/23014https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.htmlhttps://mail.python.org/archives/list/[email protected]/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/https://security.netapp.com/advisory/ntap-20240726-0005/http://www.openwall.com/lists/oss-security/2024/06/28/4https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3ehttps://github.com/python/cpython/issues/121227https://github.com/python/cpython/pull/23014https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.htmlhttps://mail.python.org/archives/list/[email protected]/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/https://security.netapp.com/advisory/ntap-20240726-0005/
2024-06-27
Published