🇰🇷 한글 설명
Python 3.11.3 이전 버전의 email 모듈이 특수문자를 포함한 이메일 주소를 잘못 파싱하여 RFC2822 헤더를 오인식합니다. 이를 악용하면 특정 도메인의 이메일만 허용하도록 설정된 인증 메커니즘을 우회할 수 있습니다.
💡 쉬운 설명
Python의 이메일 처리 프로그램이 변형된 이메일 주소를 제대로 인식하지 못합니다. 공격자는 이를 이용하여 회사 이메일(@company.com)만 가입 가능한 서비스에 다른 이메일로 가입할 수 있습니다.
🇺🇸 원문 (English)
The email module of Python through 3.11.3 incorrectly parses e-mail addresses that contain a special character. The wrong portion of an RFC2822 header is identified as the value of the addr-spec. In some applications, an attacker can bypass a protection mechanism in which application access is granted only after verifying receipt of e-mail to a specific domain (e.g., only @company.example.com addresses may be used for signup). This occurs in email/_parseaddr.py in recent versions of Python.
📍 영향받는 시스템
Python 3.9.x (3.9.16 이하), 3.10.x (3.10.12 이하), 3.11.x (3.11.3 이하)의 email 모듈
⚔️ 공격 벡터
RFC2822 특수문자를 포함한 이메일 주소를 입력하여 이메일 도메인 검증 로직을 우회
🛡️ 대응 방법
Python을 3.9.17, 3.10.13, 3.11.4 이상의 패치 버전으로 업그레이드
🔧 검증 코드
명령어 실행 후 'Vulnerable'이 출력되면 취약한 버전, 'Patched'이 출력되면 패치된 버전
python3 -c "import sys; print('Vulnerable' if (sys.version_info.major==3 and ((sys.version_info.minor==11 and sys.version_info.micro<=3) or (sys.version_info.minor==10 and sys.version_info.micro<=12) or (sys.version_info.minor==9 and sys.version_info.micro<=16))) else 'Patched')" 2>/dev/null