CVE-2023-40217: python · n/a
Affects pythonSource CVE Database V5
Not known to be exploited · fixed in 3.11.5 : update python when convenient.
Data as of 25 Oct 2026, 22:43 UTC
Rated Medium by the CNA (mitre) · No CVSS score from NVD or the CNA
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 56% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.11.5, 3.10.13, 3.9.18 +1
Exploitation evidence
Disclosed: evidence found.
CVE published 25 Aug 2023
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Upgrade python to 3.11.5, 3.10.13, 3.9.18 or 3.8.18.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIpythonpkg:pypi/pythonOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in Python versions 3.8.18, 3.9.18, 3.10.13, and 3.11.5. Users running affected versions should upgrade to these fixed releases to remediate the vulnerability. No additional mitigation actions are specified.
Description
A vulnerability in Python versions prior to 3.8.18, 3.9.18, 3.10.13, and 3.11.5 affects servers using TLS client authentication. When a TLS server-side socket is created, receives data, and is then closed quickly, there is a brief window where buffered data can be read without authentication. This data is indistinguishable from valid TLS stream data but is limited in size to the socket buffer. The issue arises because the SSLSocket instance detects the socket as not connected and does not initiate a handshake, leaving buffered data unauthenticated.
References
- python.org/dev/security/ (opens in a new tab)
- mail.python.org/archives/list/security-announce%40python.org/thread/PEPLII27KYHLF4AK3ZQGKYNCRERG4YXY/ (opens in a new tab)
- lists.debian.org/debian-lts-announce/2023/09/msg00022.html (opens in a new tab)
- security.netapp.com/advisory/ntap-20231006-0014/ (opens in a new tab)
- lists.debian.org/debian-lts-announce/2023/10/msg00017.html (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/12/msg00000.html (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/11/msg00005.html (opens in a new tab)