Skip to main content
EPSS 0.7%top 47%

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

0
Medium
VulnerabilityCVE-2024-5642cvecve-2024-5642
Published: 06/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).

CVSS v3.1

Score 6.5medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L

Affected software

Affected versions
=0=3.10.03.10.0a1

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/31/2026, 19:48:50 UTC

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.

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/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 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