CVE-2024-5642: Python Software Foundation CPython · Vulnerability
Affects Python Software Foundation CPythonSource CVE Database V5
Mentioned vulnerabilities
Not known to be exploited · CVSS 6.5 Medium.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 54% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:LExploitation evidence
Disclosed: evidence found.
CVE published 27 Jun 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Python Software Foundation CPython | Affected
| Fixed in– |
AI-suggested
Users should avoid configuring an empty list for SSLContext.set_npn_protocols() as a temporary mitigation.
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).
References
- jbp.io/2024/06/27/cve-2024-5535-openssl-memory-safety.html (opens in a new tab)
- github.com/python/cpython/pull/23014 (opens in a new tab)
- mail.python.org/archives/list/security-announce@python.org/thread/PLP2JI3PJY33YG6P5BZYSSNU66HASXBQ/ (opens in a new tab)
- github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e (opens in a new tab)
- openwall.com/lists/oss-security/2024/06/28/4 (opens in a new tab)
- github.com/python/cpython/issues/121227 (opens in a new tab)
- security.netapp.com/advisory/ntap-20240726-0005/ (opens in a new tab)
- github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31 (opens in a new tab)