---
title: "CVE-2024-0397\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2024-0397?format=md
keywords: index, follow
---

# CVE-2024-0397

Publication date 17 June 2024

Last updated 24 June 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**7.4 · High**

[Score breakdown](https://ubuntu.com/security/CVE-2024-0397?format=md#impact-score)

Toggle side navigation

## 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.

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| python2.7 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 22.04 LTS jammy | Needs evaluation |
| 20.04 LTS focal | Needs evaluation |
| 18.04 LTS bionic | Needs evaluation |
| 16.04 LTS xenial | Needs evaluation |
| 14.04 LTS trusty | Needs evaluation |
| python3.10 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 22.04 LTS jammy | Fixed 3.10.12-1~22.04.5 |
| 20.04 LTS focal | Not in release |
| python3.11 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Ignored end of life, was needs-triage |
| 22.04 LTS jammy | Needs evaluation |
| 20.04 LTS focal | Not in release |
| python3.12 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not affected |
| 24.04 LTS noble | Not affected |
| 23.10 mantic | Ignored end of life, was needs-triage |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Not in release |
| python3.4 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Not in release |
| 14.04 LTS trusty | Needs evaluation |
| python3.5 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Not in release |
| 16.04 LTS xenial | Not affected |
| 14.04 LTS trusty | Not affected |
| python3.6 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Not in release |
| 18.04 LTS bionic | Needs evaluation |
| python3.7 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Not in release |
| 18.04 LTS bionic | Needs evaluation |
| python3.8 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Fixed 3.8.10-0ubuntu1~20.04.11 |
| 18.04 LTS bionic | Needs evaluation |
| python3.9 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Needs evaluation |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2024-0397?format=md#patch-details)

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| python3.10 | * Upstream:   [37324b4](https://github.com/python/cpython/commit/37324b421b72b7bc9934e27aba85d48d4773002e) |
| python3.11 | * Upstream:   [01c37f1](https://github.com/python/cpython/commit/01c37f1d0714f5822d34063ca7180b595abf589d) |
| python3.12 | * Upstream:   [542f327](https://github.com/python/cpython/commit/542f3272f56f31ed04e74c40635a913fbc12d286) |
| python3.8 | * Upstream:   [29c9728](https://github.com/python/cpython/commit/29c97287d205bf2f410f4895ebce3f43b5160524) |
| python3.9 | * Upstream:   [b228655](https://github.com/python/cpython/commit/b228655c227b2ca298a8ffac44d14ce3d22f6faa) |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

7.4 · High

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | High |
  | Privileges required | None |
  | User interaction | None |
  | Scope | Unchanged |
  | Confidentiality impact | High |
  | Integrity impact | None |
  | Availability impact | High |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 7.4 · High |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-0397)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2024-0397)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2024-0397)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2024-0397)

### Related Ubuntu Security Notices (USN)

+ [USN-6928-1](https://usn.ubuntu.com/USN-6928-1)
+ Python vulnerabilities
+ 30 July 2024

### Other references

* <https://www.cve.org/CVERecord?id=CVE-2024-0397>
* <https://github.com/python/cpython/pull/114573>
* <https://mail.python.org/archives/list/security-announce@python.org/thread/BMAK5BCGKYWNJOACVUSLUF6SFGBIM4VP/>
* <https://github.com/python/cpython/commit/bce693111bff906ccf9281c22371331aaff766ab (3.13)>
* <http://www.openwall.com/lists/oss-security/2024/06/17/2>
