🇰🇷 한글 설명
HTTPX2 라이브러리에서 SOCKS5 프록시를 통해 wss(WebSocket Secure)를 사용할 때 TLS 연결이 정상적으로 시작되지 않는 취약점이 발견되었습니다. 이로 인해 인증 헤더, 쿠키 및 웹소켓 프레임 데이터가 암호화되지 않은 평문 상태로 전송될 수 있습니다. 공격자는 이를 가로채거나 조작하여 서버를 사칭할 수 있습니다.
💡 쉬운 설명
보안 연결이 필요한 웹소켓 통신이 프록시를 거칠 때 암호화되지 않고 그대로 노출되는 문제입니다. 해커가 중간에서 사용자의 비밀번호나 중요한 데이터를 훔쳐보거나 내용을 바꿀 수 있습니다.
🇺🇸 원문 (English)
HTTPX2 is a next generation HTTP client for Python. Prior to 2.10.0, httpcore2 fails to start TLS in src/httpcore2/httpcore2/_sync/socks_proxy.py and src/httpcore2/httpcore2/_async/socks_proxy.py when the remote origin uses wss through a SOCKS5 proxy because the TLS upgrade condition only recognizes https. HTTPX2 exposes the flaw through Client.websocket() and AsyncClient.websocket() from 2.6.0 through 2.9.1, so the opening handshake, query parameters, Authorization headers, cookies, and subsequent frames can cross the proxy path in plaintext without certificate verification. An attacker controlling or observing that path can read or modify traffic and impersonate the WebSocket server. This issue is fixed in httpcore2 2.10.0 and HTTPX2 2.10.0.
📍 영향받는 시스템
HTTPX2 2.6.0 ~ 2.9.1 및 httpcore2 2.10.0 미만 버전
⚔️ 공격 벡터
SOCKS5 프록시 환경에서 wss 프로토콜을 사용하는 클라이언트의 통신 데이터를 중간에서 가로채는 중간자 공격(MitM)
🛡️ 대응 방법
HTTPX2 및 httpcore2 버전을 2.10.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 httpx2 2.10.0 또는 httpcore2 2.10.0 미만인지 확인합니다.
pip show httpx2 httpcore2 | grep -E 'Name:|Version:'