CVE-2024-0397 — A defect was discovered in the Python “ssl” module where there is a memory race
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
Published
2024-06-17T15:09:40.896Z
Last modified
2025-11-03T21:50:55.091Z
01What is this vulnerability?
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…
02Affected products
| Vendor | Product | Versions |
|---|
| Python Software Foundation | CPython | 0, 3.9.0, 3.10.0, 3.11.0, 3.12.0, 3.13.0a1 |
03Active exploitation status
Not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog. EPSS is the best forward-looking signal — see the EPSS row above.
04Recommended remediation
- Patch to a fixed version listed in the vendor advisory (see references below).
- Mitigate with WAF rules, network egress filters, or feature flags where the patch is not yet available.
- Hunt historical logs for exploitation indicators — see Detection signatures below.
05Technical details
For the full vendor write-up, exploit chains, and reference implementations, see the references list in section 09.
06Detection signatures
Ask SARA in chat to draft a starting detection for this CVE in your stack of choice.
07Related CVEs
No directly-cited follow-up CVEs in the KB record for this advisory. The references list in section 09 carries the vendor cross-references.
08Timeline
- Published: 2024-06-17T15:09:40.896Z
- Last modified: 2025-11-03T21:50:55.091Z
09References
- github.com — https://github.com/python/cpython/issues/114572
- github.com — https://github.com/python/cpython/pull/114573
- mail.python.org — https://mail.python.org/archives/list/[email protected]/thread/BMAK5B…
- github.com — https://github.com/python/cpython/commit/01c37f1d0714f5822d34063ca7180b595abf589…
- github.com — https://github.com/python/cpython/commit/29c97287d205bf2f410f4895ebce3f43b516052…
- github.com — https://github.com/python/cpython/commit/37324b421b72b7bc9934e27aba85d48d4773002…
- github.com — https://github.com/python/cpython/commit/542f3272f56f31ed04e74c40635a913fbc12d28…
- github.com — https://github.com/python/cpython/commit/b228655c227b2ca298a8ffac44d14ce3d22f6fa…
- github.com — https://github.com/python/cpython/commit/bce693111bff906ccf9281c22371331aaff766a…
- www.openwall.com — http://www.openwall.com/lists/oss-security/2024/06/17/2
Want this in your SOAR or SIEM?
SARA's API returns EPSS, CVSS, KEV, and an analyst-grade summary in one call.
Read the API reference →