CVE-2023-40217
No exploitation reported by the sources we read.
- Published2023-08-25
- Fixed in3.11.5 · 3.10.13 · 3.9.18 · 3.8.18
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
Description
An issue was discovered in Python before 3.8.18, 3.9.x before 3.9.18, 3.10.x before 3.10.13, and 3.11.x before 3.11.5. It primarily affects servers (such as HTTP servers) that use 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. Data is limited in size to the amount that will fit in the buffer. (The TLS connection cannot directly be used for data exfiltration because the vulnerable code path requires that the connection be closed on initialization of the SSLSocket.)
Timeline
dates in UTC- 2023-08-2501:15CVE publishedNVD
Versions per branch
NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.11 | ≥ 3.11.0, < 3.11.5 | 3.11.5 | NVD · OSV |
| 3.10 | ≥ 3.10.0, < 3.10.13 | 3.10.13 | NVD · OSV |
| 3.9 | ≥ 3.9.0, < 3.9.18 | 3.9.18 | NVD · OSV |
| 3.8 | < 3.8.18 | 3.8.18 | NVD · OSV |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- babelRocky Linux:8all versions · fixed in 0:2.5.1-10.module+el8.9.0+1531+a18208f5
- babelRed Hat:rhel_aus:8.2::appstreamall versions · fixed in 0:2.5.1-9.module+el8.1.0+3111+de3f2d8eand 1 other package
- babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.5.1-10.module+el8.5.0+11014+88fc0d0band 1 other package
- babelAlmaLinux:8all versions · fixed in 2.5.1-10.module_el8.6.0+2781+fed64c13and 1 other package
- CythonRocky Linux:8all versions · fixed in 0:0.28.1-7.module+el8.9.0+1531+a18208f5
- CythonRocky Linux:8all versions · fixed in 0:0.29.21-5.module+el8.10.0+1582+bc278001
- CythonRocky Linux:8all versions · fixed in 0:0.29.21-5.module+el8.10.0+1860+afcc1c71
- CythonRed Hat:rhel_aus:8.2::appstreamall versions · fixed in 0:0.28.1-7.module+el8.1.0+3111+de3f2d8eand 3 other packages
451 more package ranges on OSV.dev
Vendor advisories
Red Hat Security Advisory: rh-python38-python security update
Fix
- Update Python to 3.11.5 · 3.10.13 · 3.9.18 · 3.8.18
- Vendor fix Red Hat Product Security RHSA-2023:6793 · 38 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
Advisories and patches
- www.python.orgVendor Advisory
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-11-08
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2024-10-02
- NVDCVSS 3.15.3read 2026-10-23
- FIRST EPSSEPSS score0.8 %2026-11-08
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- AZL-109668same flawAzure Linux · MIT
- AZL-31170same flawAzure Linux · MIT
- BIT-libpython-2023-40217same flawBitnami · Apache-2.0
- BIT-python-2023-40217same flawBitnami · Apache-2.0
- BIT-python-min-2023-40217same flawBitnami · Apache-2.0
- CGA-g7hf-7jwg-4fqvsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-gqhm-88q2-2g9fsame flawChainguard · CC-BY-NC-ND-4.0
- EUVD-2023-44814same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-4j9r-82g6-9mj3same flawGitHub Advisory Database · CC-BY-4.0
- PSF-2023-8same flawPython Software Foundation · CC-BY-4.0
- ALSA-2023:5456advisory covering several CVEsAlmaLinux · MIT
- ALSA-2023:5462advisory covering several CVEsAlmaLinux · MIT
- ALSA-2023:5463advisory covering several CVEsAlmaLinux · MIT
- ALSA-2023:5994advisory covering several CVEsAlmaLinux · MIT
- ALSA-2023:5997advisory covering several CVEsAlmaLinux · MIT
- ALSA-2023:5998advisory covering several CVEsAlmaLinux · MIT
- DLA-3575-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-3614-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-3948-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-3980-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2024-0084advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2023-1677advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2024:13193-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:13201-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:13215-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:13219-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:13236-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:13248-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:14109-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:14434-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2025:15713-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2023:5456advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5462advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5463advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5472advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5528advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5531advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5990advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5991advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5992advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5993advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5994advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5995advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5996advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5997advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:5998advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:6068advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:6069advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:6290advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2023:6793advisory covering several CVEsRed Hat · CC-BY-4.0
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Published
- 2023-08-25
- Last Modified
- 2026-06-17
- NVD status
- Modified
- GitHub Advisory
- GHSA-4j9r-82g6-9mj3
Frequently asked questions
What is CVE-2023-40217?
Is CVE-2023-40217 actively exploited?
What is the CVSS score for CVE-2023-40217?
Running Python? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-4j9r-82g6-9mj3
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0