🇰🇷 한글 설명
Twisted 26.10.0rc1 이전 버전의 twisted.web.http.HTTPChannel.headerReceived는 HTTP 헤더 값의 NUL 바이트는 거부하지만 단독 CR(캐리지 리턴)이나 단독 LF(라인 피드)는 허용합니다. Twisted는 헤더 줄을 CRLF로만 분리하므로, 엄격하지 않은 프론트엔드가 단독 문자를 줄 종료로 취급할 때 숨겨진 Content-Length 헤더의 프레이밍 해석이 달라져 요청 스매글링이 발생할 수 있습니다. 이는 이전 요청 스매글링 보호 조치의 불완전한 수정으로 인한 잔여 취약점입니다.
💡 쉬운 설명
웹 서버와 앞단 프록시가 HTTP 요청의 끝을 서로 다르게 판단하게 만드는 취약점입니다. 공격자는 이 차이를 이용해 프록시의 접근 통제를 우회하거나 다른 사용자의 응답을 가로챌 수 있습니다.
🇺🇸 원문 (English)
Twisted is an event-based framework for internet applications, supporting Python 3.6+. Prior to 26.10.0rc1, twisted.web.http.HTTPChannel.headerReceived rejects a NUL byte in an HTTP header value but accepts a bare carriage return or bare line feed. Because Twisted splits header lines only on CRLF, a hidden Content-Length header can remain folded into another value while a lenient front end treats the bare character as a line terminator. The resulting framing disagreement can smuggle a following request past front-end access controls, poison a shared connection or cache, and expose a later client to the wrong response. This issue is an incomplete-fix residual of earlier Twisted request-smuggling protections. This issue is fixed in version 26.10.0rc1.
📍 영향받는 시스템
Twisted 26.10.0rc1 이전 버전을 사용하는 Python 기반 웹 애플리케이션 및 서버
⚔️ 공격 벡터
단독 CR/LF 문자를 포함한 조작된 HTTP 헤더를 전송해 프록시와 Twisted 간 요청 경계 해석을 어긋나게 하는 방식
🛡️ 대응 방법
Twisted를 26.10.0rc1 이상으로 업그레이드합니다 (pip install --upgrade 'twisted>=26.10.0rc1').
🔧 검증 코드
출력된 버전이 26.10.0rc1 미만이면 취약하며, 같거나 그 이상이면 패치가 적용된 것입니다.
python3 -c "import twisted; print(twisted.__version__)" 2>/dev/null