🔍 CVE-2024-0397

7.4
CVSS Score
HIGH
2024-06-17
2026-04-15 00:35
✅ 완료

🇰🇷 한글 설명

Python 'ssl' 모듈의 메모리 경합 조건 취약점으로, ssl.SSLContext의 cert_store_stats()와 get_ca_certs() 메서드 호출 시 동시에 인증서가 로드될 때 발생합니다. 특히 인증서 디렉토리가 구성된 TLS 핸드셰이크 중에 트리거될 수 있으며, CPython 3.10.14, 3.11.9, 3.12.3, 3.13.0a5 이상에서 수정되었습니다.

💡 쉬운 설명

Python의 보안 통신 라이브러리에서 두 작업이 동시에 실행될 때 메모리가 손상되는 문제입니다. 이로 인해 암호화 통신이 불안정해지거나 보안 검증이 제대로 작동하지 않을 수 있습니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

CPython 3.10.13 이하, 3.11.8 이하, 3.12.2 이하, 3.13.0a4 이하

⚔️ 공격 벡터

TLS 핸드셰이크 중 인증서 로드와 동시에 cert_store_stats() 또는 get_ca_certs() 메서드 호출로 메모리 경합 조건 트리거

🛡️ 대응 방법

CPython을 3.10.14, 3.11.9, 3.12.3, 3.13.0a5 이상으로 업그레이드

🔧 검증 코드

출력된 버전이 명시된 패치 버전 이상이면 취약점이 수정된 상태이고, 그 이하면 취약합니다.

Shell / Script
python3 --version && python3 -c "import sys; print('Patched' if (sys.version_info[:3] >= (3, 10, 14) or sys.version_info[:3] >= (3, 11, 9) or sys.version_info[:3] >= (3, 12, 3)) else 'Vulnerable')"

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Python