🇰🇷 한글 설명
Python 2.x(2.7.16 이하) 및 3.x(3.7.3 이하)의 urllib/urllib2 라이브러리에서 CRLF 인젝션 취약점이 발견되었습니다. 공격자가 URL 파라미터를 제어할 수 있는 경우, 줄바꿈 문자를 삽입하여 임의의 HTTP 헤더를 추가하거나 Redis 명령어를 실행할 수 있습니다.
💡 쉬운 설명
웹 주소에 몰래 줄바꿈 문자를 넣어 명령어를 전달하는 공격 방식입니다. 이를 통해 해커가 서버에 가짜 정보를 보내거나 데이터베이스에 잘못된 명령을 내릴 수 있습니다.
🇺🇸 원문 (English)
An issue was discovered in urllib2 in Python 2.x through 2.7.16 and urllib in Python 3.x through 3.7.3. CRLF injection is possible if the attacker controls a url parameter, as demonstrated by the first argument to urllib.request.urlopen with \r\n (specifically in the path component of a URL that lacks a ? character) followed by an HTTP header or a Redis command. This is similar to the CVE-2019-9740 query string issue. This is fixed in: v2.7.17, v2.7.17rc1, v2.7.18, v2.7.18rc1; v3.5.10, v3.5.10rc1, v3.5.8, v3.5.8rc1, v3.5.8rc2, v3.5.9; v3.6.10, v3.6.10rc1, v3.6.11, v3.6.11rc1, v3.6.12, v3.6.9, v3.6.9rc1; v3.7.4, v3.7.4rc1, v3.7.4rc2, v3.7.5, v3.7.5rc1, v3.7.6, v3.7.6rc1, v3.7.7, v3.7.7rc1, v3.7.8, v3.7.8rc1, v3.7.9.
📍 영향받는 시스템
Python 2.x (2.7.16 이하), Python 3.x (3.7.3 이하)
⚔️ 공격 벡터
URL 경로에 CRLF(
) 문자를 삽입하여 HTTP 헤더 조작 또는 Redis 명령 실행
🛡️ 대응 방법
Python 버전을 v2.7.17 이상 또는 v3.7.9 이상으로 업데이트
🔧 검증 코드
출력된 Python 버전을 확인하여 취약한 버전 범위에 해당하는지 대조합니다.
python --version 2>/dev/null || python3 --version 2>/dev/null