CVE-2024-0397

Memory race condition in ssl.SSLContext certificate store methods

State
Published
Severity
7.4 High
Published
Jun 17, 2024
Updated
Nov 3, 2025
Reserved
Jan 10, 2024

Read the record on cve.org

Description

A defect was discovered in the Python “ssl” module where there is a memory race condition with the ssl.SSLContext methods “cert_store_stats()” and “get_ca_certs()”. The race condition can be triggered if the methods are called at the same time as certificates are loaded into the SSLContext, such as during the TLS handshake with a certificate directory configured. This issue is fixed in CPython 3.10.14, 3.11.9, 3.12.3, and 3.13.0a5.

Scores

CVSSScoreVectorSource
3.17.4 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:HCISA-ADP

Weaknesses

  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Affected Products

ProductVersions
CPythonPython Software Foundation
  • before 3.8.20Affected
  • 3.9.0 to before 3.9.20Affected
  • 3.10.0 to before 3.10.14Affected
  • 3.11.0 to before 3.11.9Affected
  • 3.12.0 to before 3.12.3Affected
  • 3.13.0a1 to before 3.13.0a5Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.