CVE-2024-5642: Vulnerability in Python Software Foundation CPython
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).
AI Analysis
Technical Summary
CVE-2024-5642 affects CPython 3.9 and earlier by permitting an empty list to be set for SSLContext.set_npn_protocols(), an invalid configuration for OpenSSL that leads to a buffer over-read vulnerability. This issue stems from improper input validation in CPython's SSLContext interface when interacting with OpenSSL's NPN feature. The vulnerability has a CVSS score of 6.5 (medium severity) but is mitigated in impact by the limited use of NPN and the unlikely scenario of setting an empty protocol list.
Potential Impact
The vulnerability can cause a buffer over-read in the OpenSSL library when NPN is used with an empty protocol list configured via CPython. This may lead to information disclosure or application instability. However, the practical impact is limited due to the rarity of NPN usage and the uncommon nature of setting an empty list for protocols.
Mitigation Recommendations
No official patch or fix information is provided in the available data. Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Users should avoid configuring an empty list for SSLContext.set_npn_protocols() as a temporary mitigation.
CVE-2024-5642: Vulnerability in Python Software Foundation CPython
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).
CVSS v3.1
Score 6.5medium
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2024-5642 affects CPython 3.9 and earlier by permitting an empty list to be set for SSLContext.set_npn_protocols(), an invalid configuration for OpenSSL that leads to a buffer over-read vulnerability. This issue stems from improper input validation in CPython's SSLContext interface when interacting with OpenSSL's NPN feature. The vulnerability has a CVSS score of 6.5 (medium severity) but is mitigated in impact by the limited use of NPN and the unlikely scenario of setting an empty protocol list.
Potential Impact
The vulnerability can cause a buffer over-read in the OpenSSL library when NPN is used with an empty protocol list configured via CPython. This may lead to information disclosure or application instability. However, the practical impact is limited due to the rarity of NPN usage and the uncommon nature of setting an empty list for protocols.
Mitigation Recommendations
No official patch or fix information is provided in the available data. Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Users should avoid configuring an empty list for SSLContext.set_npn_protocols() as a temporary mitigation.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- PSF
- Date Reserved
- 2024-06-04T18:40:21.539Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68e54032a677756fc996bc83
Added to database: 10/07/2025, 16:30:42 UTC
Last enriched: 07/31/2026, 19:48:50 UTC
Last updated: 09/10/2026, 19:36:49 UTC
Views: 466
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.