CVE-2024-5642Buffer overread when using an empty list with SSLContext.set_npn_protocols()
- 6.5MediumCVSS base score
- 0.74%Exploitation in 30 daysEPSS · top 45% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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).
Timeline
ID reserved
By PSF
- 23 days later
· 23 days later
Published
- 2 years later
· 2 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L |
| NVDNVD · Deferred | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L |
- EPSS (exploitation in 30 days)
- 0.74% · top 45% of all CVEs (13 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.5.
Affected products
Python Software Foundation · CPython
- affected < 3.9.24
- affected 3.10.0a1 – < 3.10.0b1
References
References8
- https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html (opens in a new tab)third-party-advisoryx_transferred
- https://github.com/python/cpython/pull/23014 (opens in a new tab)mitigationx_transferred
- https://mail.python.org/archives/list/[email protected]/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/ (opens in a new tab)vendor-advisoryx_transferred
- https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e (opens in a new tab)patchx_transferred
- http://www.openwall.com/lists/oss-security/2024/06/28/4 (opens in a new tab)x_transferred
- https://github.com/python/cpython/issues/121227 (opens in a new tab)issue-trackingx_transferred
- https://security.netapp.com/advisory/ntap-20240726-0005/ (opens in a new tab)x_transferred
- https://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31 (opens in a new tab)patch
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-46822 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-5642)Record last updated .