CVE-2024-0397
Python Interpreter vulnerability analysis and mitigation

Overview

CVE-2024-0397 is a security vulnerability discovered in Python's 'ssl' module affecting the ssl.SSLContext methods 'certstorestats()' and 'getcacerts()'. The vulnerability was disclosed on June 17, 2024, and affects multiple versions of Python. The issue has been fixed in CPython versions 3.10.14, 3.11.9, 3.12.3, and 3.13.0a5 (Python Security, NVD).

Technical details

The vulnerability is a memory race condition that occurs in the Python ssl module's SSLContext methods. The race condition can be triggered when certstorestats() or getcacerts() methods are called simultaneously with certificate loading operations into the SSLContext, particularly during TLS handshake with a configured certificate directory. The issue has been assigned a CVSS v3.1 base score of 7.4 (HIGH) with the vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H (NVD).

Impact

When exploited, this vulnerability could lead to race conditions in certificate store operations, potentially affecting the security and reliability of TLS connections in Python applications that share SSLContext across multiple threads (OSS Security).

Mitigation and workarounds

The recommended mitigation is to upgrade to the fixed versions of Python: CPython 3.10.14, 3.11.9, 3.12.3, or 3.13.0a5. The fix involves proper locking mechanisms for certificate store access when the SSLContext is shared across multiple threads (Python Security).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management