# CVE-2024-5642: Buffer overread when using an empty list with SSLContext.set\_npn\_protocols()

- Priority: **Routine**
- Reason: Not severe (CVSS 6.5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-06-27 · Modified: 2026-07-31
- Aliases: SUSE-SU-2024:3351-1, SUSE-SU-2024:3353-1, UBUNTU-CVE-2024-5642, DEBIAN-CVE-2024-5642, CGA-5fx2-wjp3-8fvc, CGA-j978-3qf9-6mgg
- Record: https://cvemate.com/vulnerability/CVE-2024-5642 · JSON: https://cvemate.com/vulnerability/CVE-2024-5642/json

## Description

```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).
```

## Signals

- CVSS: 6.5 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
- EPSS: 0.744%, percentile 56.123%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard python-3.9 (Chainguard): \< 3.9.25-r0
- debian pypy3 (Debian): \< 7.3.10+dfsg-1
- ubuntu python2.7 (Ubuntu): All versions (No fix recorded)
- ubuntu python3.4 (Ubuntu): All versions (No fix recorded)
- ubuntu python3.5 (Ubuntu): All versions (No fix recorded)
- ubuntu python3.9 (Ubuntu): All versions (No fix recorded)
- python software foundation cpython: \< 3.9.24 \| ≥ 3.10.0a1, \< 3.10.0b1
- suse python3-core&distro=SUSE Linux Enterprise Micro 5.1 (SUSE Linux Enterprise): \< 3.6.15-150000.3.158.1
- suse python36-core&distro=SUSE Linux Enterprise Server 12 SP5 (SUSE Linux Enterprise): \< 3.6.15-64.1
- suse python36-core&distro=SUSE Linux Enterprise Server for SAP Applications 12 SP5 (SUSE Linux Enterprise): \< 3.6.15-64.1
- suse python36-core&distro=SUSE Linux Enterprise Software Development Kit 12 SP5 (SUSE Linux Enterprise): \< 3.6.15-64.1
- suse python36&distro=SUSE Linux Enterprise Server 12 SP5 (SUSE Linux Enterprise): \< 3.6.15-64.1
- suse python36&distro=SUSE Linux Enterprise Server for SAP Applications 12 SP5 (SUSE Linux Enterprise): \< 3.6.15-64.1
- suse python3&distro=SUSE Linux Enterprise Micro 5.1 (SUSE Linux Enterprise): \< 3.6.15-150000.3.158.1

## 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>
- <https://www.suse.com/support/update/announcement/2024/suse-su-20243351-1/>
- <https://bugzilla.suse.com/1227233>
- <https://www.suse.com/security/cve/CVE-2024-5642>
- <https://www.suse.com/support/update/announcement/2024/suse-su-20243353-1/>
- <https://ubuntu.com/security/CVE-2024-5642>
- <https://www.cve.org/CVERecord?id=CVE-2024-5642>
- <https://security-tracker.debian.org/tracker/CVE-2024-5642>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5642.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5642>
- <https://github.com/python/cpython>

---

Data as of 2026-12-05T08:54:31.054Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
