🔍 CVE-2024-5642

6.5
CVSS Score
MEDIUM
2024-06-27
2026-07-31 15:16
✅ 완료

🇰🇷 한글 설명

CPython 3.9 이하에서 SSLContext.set_npn_protocols()에 빈 리스트("")를 설정할 수 있도록 허용하여 OpenSSL API의 잘못된 값으로 처리된다. NPN 사용 시 버퍼 오버리드가 발생하며, NPN이 널리 사용되지 않아 낮은 심각도의 취약점이다.

💡 쉬운 설명

Python의 HTTPS 보안 설정 함수에서 빈 값을 받으면 메모리 버퍼 오버리드가 발생할 수 있다. 실제로는 NPN이라는 기능이 거의 사용되지 않아 위험도는 낮지만 업데이트가 필요하다.

🇺🇸 원문 (English)

CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SSLContext.set_npn_protocols() which is an invalid value for the underlying OpenSSL API. This results in a buffer over-read when NPN is used (see CVE-2024-5535 for OpenSSL). This vulnerability is of low severity due to NPN being not widely used and specifying an empty list likely being uncommon in-practice (typically a protocol name would be configured).

📍 영향받는 시스템

CPython 3.9 이하 (Python 3.9.x, 3.8.x, 3.7.x 등)

⚔️ 공격 벡터

원격 공격자가 NPN 프로토콜 협상을 이용하여 빈 리스트 설정을 강요하는 경우

🛡️ 대응 방법

Python을 3.10 이상으로 업그레이드하거나 공식 패치 적용

🔧 검증 코드

Python 버전이 3.9 이하면 'Vulnerable', 3.10 이상이면 'Not vulnerable' 출력

Shell / Script
python3 --version 2>/dev/null | grep -oE '3\.[0-9]+' | awk '{if($1 <= 3.9) print "Vulnerable"; else print "Not vulnerable"}'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

OpenSSL