🇰🇷 한글 설명
Python의 cryptography 패키지 45.0.0에서 48.0.0 버전 사이에서 DNS 제약 조건 검증 오류가 발견되었습니다. 중간 CA가 특정 도메인(foo.example.com)을 허용할 때, 와일드카드 인증서(*.example.com)가 허용 범위를 벗어난 다른 형제 도메인(bar.example.com)까지 승인할 수 있는 취약점입니다. 이로 인해 유효하지 않은 인증서 체인이 수락될 수 있습니다.
💡 쉬운 설명
인증서가 허용된 주소인지 확인하는 과정에서 실수로 잘못된 주소의 인증서까지 통과시켜주는 보안 결함입니다. 이로 인해 공격자가 가짜 사이트 인증서를 사용해도 프로그램이 이를 정상으로 착각할 수 있습니다.
🇺🇸 원문 (English)
cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. In versions 45.0.0 through 48.0.0, if an intermediate constrained CA permits the DNS name foo.example.com, and the leaf certificate has a wildcard in its DNS SAN of *.example.com, python-cryptography's verifier accepts which allows escaping outside of the permitted names. The core issue is in DNSConstraint::matches, where a wildcard pattern was treated as matching a more-specific permitted constraint even though *.example.com can expand to sibling names such as bar.example.com outside foo.example.com. This allows acceptance of an invalid certificate chain. This issue is fixed in 49.0.0.
📍 영향받는 시스템
python-cryptography versions 45.0.0 through 48.0.0
⚔️ 공격 벡터
와일드카드 인증서를 이용해 허용되지 않은 도메인으로의 인증서 검증 우회
🛡️ 대응 방법
cryptography 패키지를 49.0.0 이상의 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 45.0.0 미만이거나 49.0.0 이상이면 안전하며, 45.0.0~48.0.0 사이라면 취약합니다.
pip show cryptography | grep Version