Skip to main content
VulnerabilityPublished Updated

CVE-2023-40217: python

Affects pythonSource CVE Database V5

0

Not known to be exploited · fixed in 3.11.5 : update python when convenient.

Data as of 26 Oct 2026, 12:54 UTC

Severity
Medium

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

  1. Disclosed: evidence found.

    CVE published 25 Aug 2023

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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 26 Oct 2026.

What to do

Upgrade python to 3.11.5, 3.10.13, 3.9.18 or 3.8.18.

Affected software

ProductAffectedFixed in
PyPIpythonpkg:pypi/pythonOther threatsAffected
  • <3.8.18
  • <3.9.18
  • <3.10.13
  • <3.11.5
Fixed in
  • 3.8.18
  • 3.9.18
  • 3.10.13
  • 3.11.5

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

Community reviews

Loading reviews…