{"id":"CVE-2024-0397","published":"2024-06-17T15:09:40Z","modified":"2025-11-03T21:50:55Z","title":"Memory race condition in ssl.SSLContext certificate store methods","vendor":"Python Software Foundation","product":"CPython","tier":"tail","description":{"text":"A defect was discovered in the Python “ssl” module where there is a memory\nrace condition with the ssl.SSLContext methods “cert_store_stats()” and\n“get_ca_certs()”. The race condition can be triggered if the methods are\ncalled at the same time as certificates are loaded into the SSLContext,\nsuch as during the TLS handshake with a certificate directory configured.\nThis issue is fixed in CPython 3.10.14, 3.11.9, 3.12.3, and 3.13.0a5.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.0081,"percentile":0.5783,"provenance":"source"},"cwes":[{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"references":[{"url":"https://github.com/python/cpython/issues/114572","tags":["issue-tracking"]},{"url":"https://github.com/python/cpython/pull/114573","tags":["patch"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/BMAK5BCGKYWNJOACVUSLUF6SFGBIM4VP/","tags":["vendor-advisory"]},{"url":"https://github.com/python/cpython/commit/01c37f1d0714f5822d34063ca7180b595abf589d","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/29c97287d205bf2f410f4895ebce3f43b5160524","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/37324b421b72b7bc9934e27aba85d48d4773002e","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/542f3272f56f31ed04e74c40635a913fbc12d286","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/b228655c227b2ca298a8ffac44d14ce3d22f6faa","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/bce693111bff906ccf9281c22371331aaff766ab","tags":["patch"]},{"url":"http://www.openwall.com/lists/oss-security/2024/06/17/2","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20250411-0006/","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html","tags":[]}],"priority":{"score":16.7,"factors":[{"name":"EPSS percentile","points":11.57},{"name":"CVSS severity","points":5.18}]},"vendorSlug":"python-software-foundation","affectedVersions":[{"vendor":"Python Software Foundation","product":"CPython","versions":["< 3.8.20",">= 3.9.0, < 3.9.20",">= 3.10.0, < 3.10.14",">= 3.11.0, < 3.11.9",">= 3.12.0, < 3.12.3",">= 3.13.0a1, < 3.13.0a5"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2024-06-20T15:52:27.499743Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-16193","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-python-software-foundation-cpython-cve-2024-0397","children":[{"from":"CVE-2024-0397","to":"CVE-2024-5642","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["Modules/_ssl.c"],"commits":["https://github.com/python/cpython/commit/01c37f1d0714f5822d34063ca7180b595abf589d","https://github.com/python/cpython/commit/29c97287d205bf2f410f4895ebce3f43b5160524","https://github.com/python/cpython/commit/39258d3595300bc7b952854c915f63ae2d4b9c3e","https://github.com/python/cpython/commit/a2cdbb6e8188ba9ba8b356b28d91bff60e86fe31"],"basis":"rarely changed file"}]},{"from":"CVE-2024-0397","to":"CVE-2026-115557","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["Modules/_ssl.c"],"commits":["https://github.com/python/cpython/commit/01c37f1d0714f5822d34063ca7180b595abf589d","https://github.com/python/cpython/commit/29c97287d205bf2f410f4895ebce3f43b5160524","https://github.com/python/cpython/commit/21a50891ab4be2e9955239e625ae2b40c6b1854d","https://github.com/python/cpython/commit/36cd295f32fc9ba19399e01abee91231440a41dd"],"basis":"rarely changed file"}]}]}}