Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-5642: Vulnerability in Python Software Foundation CPython

0
Medium
VulnerabilityCVE-2024-5642cvecve-2024-5642
Published: Thu Jun 27 2024 (06/27/2024, 21:05:31 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: 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).

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/22/2026, 05:44:25 UTC

Technical Analysis

The vulnerability in CPython 3.9 and earlier arises from allowing an empty list to be passed to SSLContext.set_npn_protocols(), which is not disallowed by CPython but is invalid for OpenSSL's API. This leads to a buffer over-read condition when NPN is enabled, as referenced by CVE-2024-5535 in OpenSSL. The issue is of medium severity (CVSS 6.5) due to network attack vector, low complexity, no privileges required, no user interaction, and limited confidentiality and availability impact. No known exploits are reported in the wild.

Potential Impact

The impact is a potential buffer over-read in CPython's SSL context when NPN is used with an empty protocol list, which could lead to limited information disclosure or application instability. However, since NPN is not widely used and configuring an empty list is unlikely in practice, the real-world risk is low to medium. There is no indication of privilege escalation or integrity impact.

Mitigation Recommendations

Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until a fix is available, avoid configuring an empty list for SSLContext.set_npn_protocols(). Given the low usage of NPN, disabling NPN or avoiding its use can mitigate exposure. Monitor official Python updates for patches addressing this issue.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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/7/2025, 4:30:42 PM

Last enriched: 4/22/2026, 5:44:25 AM

Last updated: 5/9/2026, 8:27:54 AM

Views: 364

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses