CVE-2024-0397
Memory race condition in ssl.SSLContext certificate store methods
Reported by psf · Published June 17, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python3-libs | Amazon Linux | 3.9.16-1.amzn2023.0.9, 3.7.16-1.amzn2.0.13 |
| python3-tkinter | Amazon Linux | 3.9.16-1.amzn2023.0.9, 3.7.16-1.amzn2.0.13 |
| python3.11 | Amazon Linux | 3.11.6-1.amzn2023.0.5 |
| python3-test | Amazon Linux | 3.9.16-1.amzn2023.0.9, 3.7.16-1.amzn2.0.13 |
| python3.11-test | Amazon Linux | 3.11.6-1.amzn2023.0.5 |
| python3.11-libs | Amazon Linux | 3.11.6-1.amzn2023.0.5 |
| python3-devel | Amazon Linux | 3.9.16-1.amzn2023.0.9, 3.7.16-1.amzn2.0.13 |
| python3.11-devel | Amazon Linux | 3.11.6-1.amzn2023.0.5 |
| python3-idle | Amazon Linux | 3.9.16-1.amzn2023.0.9 |
| python | Bitnami | 3.12.3, 3.11.9, 3.10.14, 3.9.20, 3.8.20 |
| python3 | Amazon Linux | 3.9.16-1.amzn2023.0.9, 3.7.16-1.amzn2.0.13 |
| python-3.8 | Chainguard | 3.8.19-r1 |
27 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Python Software Foundation | CPython | 0, 3.9.0, 3.10.0 |
| Python Software Foundation | CPython | 3.13.0a1, 0, 3.9.0 |
| python_software_foundation | cpython | 0, 3.9.0, 3.10.0 |
Timeline
- Feb 16, 2024 Fix PR Merged
- Jun 17, 2024 CVE Published
- Jun 18, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (13 in total, the first dated here)
- Apr 11, 2025 PoC Published
- Mar 17, 2026 Security Advisory (25 in total, the first dated here)
- Aug 10, 2026 Distribution Patch (21 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-0397
vulnetix vdb fixes CVE-2024-0397
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-0397/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- issue-tracking
- patch
- vendor-advisory
- patch
- patch
- patch
- patch
- patch
- patch
- https://security.netapp.com/advisory/ntap-20250411-0006/ url
- https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html url