PT-2023-4595 · Python+11 · Python+11

Aapo Oksman

·

Published

2023-08-24

·

Updated

2025-11-07

·

CVE-2023-40217

CVSS v2.0

7.8

High

VectorAV:N/AC:L/Au:N/C:C/I:N/A:N
Name of the Vulnerable Software and Affected Versions Python versions prior to 3.8.18 Python versions 3.9.x prior to 3.9.18 Python versions 3.10.x prior to 3.10.13 Python versions 3.11.x prior to 3.11.5
Description An issue was discovered in Python that primarily affects servers using TLS client authentication. If a TLS server-side socket is created, receives data into the socket buffer, and then is closed quickly, there is a brief window where the SSLSocket instance will detect the socket as "not connected" and won't initiate a handshake, but buffered data will still be readable from the socket buffer. This data will not be authenticated if the server-side TLS peer is expecting client certificate authentication, and is indistinguishable from valid TLS stream data. The vulnerability affects servers, such as HTTP servers, that use TLS client authentication. It does not affect client-side HTTPS connections.
Recommendations Update to Python version 3.8.18 or later for Python 3.8.x Update to Python version 3.9.18 or later for Python 3.9.x Update to Python version 3.10.13 or later for Python 3.10.x Update to Python version 3.11.5 or later for Python 3.11.x As a temporary workaround, consider restricting access to the ssl.SSLSocket class until a patch is available.

Fix

Improper Initialization

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALSA-2023:5456
ALSA-2023:5462
ALSA-2023:5463
ALSA-2023:5994
ALSA-2023:5997
ALSA-2023:5998
ALT-PU-2023-6199
ALT-PU-2024-14519
ALT-PU-2024-14521
ALT-PU-2024-2511
ALT-PU-2024-6382
AZL-31170
BDU:2023-05002
BIT-LIBPYTHON-2023-40217
BIT-PYTHON-2023-40217
BIT-PYTHON-MIN-2023-40217
CESA-2023_5463
CESA-2023_5994
CESA-2023_5997
CESA-2023_5998
CESA-2023_6823
CESA-2023_6885
CVE-2023-40217
DLA-3575-1
DLA-3614-1
DLA-3948-1
DLA-3980-1
MGASA-2024-0084
OESA-2023-1677
OPENSUSE-SU-2023_3708-1
OPENSUSE-SU-2023_3824-1
OPENSUSE-SU-2023_3828-1
OPENSUSE-SU-2023_3933-1
OPENSUSE-SU-2023_3943-1
OPENSUSE-SU-2024:13193-1
OPENSUSE-SU-2024:13201-1
OPENSUSE-SU-2024:13215-1
OPENSUSE-SU-2024:13219-1
OPENSUSE-SU-2024:13236-1
OPENSUSE-SU-2024:13248-1
OPENSUSE-SU-2024:13890-1
OPENSUSE-SU-2024:14109-1
OPENSUSE-SU-2024:14434-1
OPENSUSE-SU-2024_0784-1
OPENSUSE-SU-2025:15713-1
PSF-2023-8
RHSA-2023:5456
RHSA-2023:5462
RHSA-2023:5463
RHSA-2023:5472
RHSA-2023:5528
RHSA-2023:5531
RHSA-2023:5990
RHSA-2023:5991
RHSA-2023:5992
RHSA-2023:5993
RHSA-2023:5994
RHSA-2023:5995
RHSA-2023:5996
RHSA-2023:5997
RHSA-2023:5998
RHSA-2023:6068
RHSA-2023:6069
RHSA-2023:6290
RHSA-2023:6793
RHSA-2023:6823
RHSA-2023:6885
RHSA-2023_5456
RHSA-2023_5462
RHSA-2023_5463
RHSA-2023_5994
RHSA-2023_5997
RHSA-2023_5998
RHSA-2023_6823
RHSA-2023_6885
RLSA-2023:5463
RLSA-2023:5997
ROSA-SA-2025-2646
ROSA-SA-2025-2676
SUSE-SU-2023:3708-1
SUSE-SU-2023:3730-1
SUSE-SU-2023:3731-1
SUSE-SU-2023:3804-1
SUSE-SU-2023:3824-1
SUSE-SU-2023:3828-1
SUSE-SU-2023:3828-2
SUSE-SU-2023:3933-1
SUSE-SU-2023:3939-1
SUSE-SU-2023:3943-1
SUSE-SU-2023_3708-1
SUSE-SU-2023_3730-1
SUSE-SU-2023_3731-1
SUSE-SU-2023_3804-1
SUSE-SU-2023_3828-1
SUSE-SU-2023_3933-1
SUSE-SU-2023_3939-1
SUSE-SU-2024:0784-1
SUSE-SU-2024:0785-1
SUSE-SU-2024_0785-1
USN-6513-1
USN-6513-2
USN-6891-1
USN-7180-1

Affected Products

Alt Linux
Almalinux
Astra Linux
Centos
Ibm Aix
Linuxmint
Python
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu