Skip to content
Fencer Vulns
high 7.4

CVE-2024-0397 json

Memory race condition in ssl.SSLContext certificate store methods

published 2024-06-17 2 y ago modified 2026-06-17 4 mo ago also BIT-libpython-2024-0397 , BIT-python-2024-0397 , BIT-python-min-2024-0397 , EUVD-2024-16193

cvss
7.4
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.8%
EPSS 0.8% chance of exploitation in 30 days, percentile 57%
public exploits
0
none known

Summary

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.

Patch / fix

  • bitnami libpython 3.8.20, 3.9.20, 3.10.14, 3.11.9, 3.12.3
  • bitnami python 3.8.20, 3.9.20, 3.10.14, 3.11.9, 3.12.3
  • bitnami python-min 3.8.20, 3.9.20, 3.10.14, 3.11.9, 3.12.3
  • Python Software Foundation CPython 3.8.20, 3.9.20, 3.10.14, 3.11.9, 3.12.3, 3.13.0a5
  • python_software_foundation cpython 3.8.20, 3.9.20, 3.10.14, 3.11.9, 3.12.3, 3.13.0a5
  • pypy3 Debian 14, Debian 13 7.3.16+dfsg-1
  • python3.11 Debian 12 3.11.2-6+deb12u3

debian advisories DEBIAN-CVE-2024-0397

  • python3.8 Ubuntu 20.04 LTS 3.8.10-0ubuntu1~20.04.11
  • python3.10 Ubuntu 22.04 LTS 3.10.12-1~22.04.5

ubuntu advisories UBUNTU-CVE-2024-0397

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python3 RHEL 9 3.9.21-1.el9_5
  • python3.9 RHEL 9 3.9.21-1.el9_5
  • python3-idle RHEL 9 3.9.21-1.el9_5
  • python3-libs RHEL 9 3.9.21-1.el9_5
  • python3-test RHEL 9 3.9.21-1.el9_5
  • python3-tkinter RHEL 9 3.9.21-1.el9_5
  • python-unversioned-command RHEL 9 3.9.21-1.el9_5
  • python3.11 RHEL 9 3.11.9-7.el9

red hat advisories RHSA-2024:10983RHSA-2024:9192RHSA-2024:9190

  • python311 SLE Module for Python 3 15 SP6, openSUSE Leap 15.6 3.11.9-150600.3.3.1
  • python311-core SLE Module for Python 3 15 SP6, SLE Module for Basesystem 15 SP6, openSUSE Leap 15.6 3.11.9-150600.3.3.1
  • python311-documentation openSUSE Leap 15.6 3.11.9-150600.3.3.1
  • python311 Linux Micro 6.1 3.11.12-slfo.1.1_1.1
  • python311-core Linux Micro 6.1 3.11.12-slfo.1.1_1.1
  • python311 Linux Micro 6.0 3.11.11-1.1
  • python311-core Linux Micro 6.0 3.11.11-1.1
  • python311 Linux Micro 6.0 3.11.8-3.1

suse advisories SUSE-SU-2025:02089-1SUSE-SU-2025:20374-1SUSE-SU-2025:20154-1SUSE-SU-2025:20025-1SUSE-EL-9-CLIENT-TOOLS-2024-4029SUSE-SU-2024:4029-1

  • python312 openSUSE Tumbleweed 3.12.5-1.1
  • python311 openSUSE Tumbleweed 3.11.9-3.1
  • python310 openSUSE Tumbleweed 3.10.14-2.1
  • python38 openSUSE Tumbleweed 3.8.19-3.1
  • python39 openSUSE Tumbleweed 3.9.19-2.1

opensuse advisories openSUSE-SU-2024:14295-1openSUSE-SU-2024:14082-1openSUSE-SU-2024:14066-1openSUSE-SU-2024:14063-1openSUSE-SU-2024:14064-1

  • python3 Azure Linux 3.0 3.12.3-1
  • python3 CBL-Mariner 2.0 3.9.19-3

azure linux advisories AZL-42784AZL-42796

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-0397 updated cvss 5.0

cpython: python: Memory race condition in ssl.SSLContext certificate store methods

  • Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 7 python, python3, tkinter, python-libs, python-test, python-tools, +4 more Red Hat Enterprise Linux 8 numpy, scipy, PyYAML, python2, python3, mod_wsgi, +94 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat CodeReady Linux Builder (v. 9) python3 3.9.21-1.el9_5, python3.11 3.11.9-7.el9, python3.12 3.12.5-2.el9, python3-idle 3.9.21-1.el9_5, python3-test 3.9.21-1.el9_5, python3.11-idle 3.11.9-7.el9, +6 more Red Hat Enterprise Linux AppStream (v. 9) python3.11 3.11.9-7.el9, python3.12 3.12.5-2.el9, python3.11-libs 3.11.9-7.el9, python3.12-libs 3.12.5-2.el9, python3-tkinter 3.9.21-1.el9_5, python3.11-tkinter 3.11.9-7.el9, +2 more
    fixed: vendor fix RHSA-2024:9192
  • Red Hat Enterprise Linux BaseOS (v. 9) python3 3.9.21-1.el9_5, python3.9 3.9.21-1.el9_5, python3-libs 3.9.21-1.el9_5
    fixed: vendor fix RHSA-2024:10983
  • Red Hat Enterprise Linux 10 python3.12
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

0.81% chance of exploitation in the next 30 days, higher than 57% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 7.4 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H
CNA 3.1 7.4 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H
OSV 3.1 7.4 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H

Affected packages

ecosystem package affected fixed in
bitnami libpython
<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.8.20
3.9.20
3.10.14
3.11.9
3.12.3
bitnami python
<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.8.20
3.9.20
3.10.14
3.11.9
3.12.3
bitnami python-min
<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.8.20
3.9.20
3.10.14
3.11.9
3.12.3

Affected products

  • Python Software Foundation CPython
  • python_software_foundation cpython

Classification

Weakness
  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.