CVE-2024-5642
published medium CVSS 3.1 · 6.5Buffer overread when using an empty list with SSLContext.set_npn_protocols()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Python Software Foundation | — | CPython0 to < 3.9.24 · 3.10.0a1 to < 3.10.0b1 · Other versions: unaffected | Affected | Not stated | PSF |
| Amazon Linux | AL2 | Release evaluationALAS2-2025-2743 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2-2025-2744 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
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).
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.5 / 10
- Severity
- medium
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Python Software Foundation | CPython | 0 to < 3.9.24 (affected · python)3.10.0a1 to < 3.10.0b1 (affected · python)Default: unaffected | PSF · cna |
Weaknesses
1- CWE-noinfo Not enough information
References
8- http://www.openwall.com/lists/oss-security/2024/06/28/4
- https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e
- https://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31
- https://github.com/python/cpython/issues/121227
- https://github.com/python/cpython/pull/23014
- https://jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html
- https://mail.python.org/archives/list/[email protected]/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/
- https://security.netapp.com/advisory/ntap-20240726-0005/
Provider assertions
3PSF · cna
Buffer overread when using an empty list with SSLContext.set_npn_protocols()
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- d219c41f929495c1b4c57c965194f499545db826ce9d680bc32828b5057446d7
- Ingested
- 23 Sep 2026, 08:32:47 UTC
- Source record
- Official CVE record