
CVE-2026-22019, libcurl HTTP/2 CONNECT 터널의 스트림 격리 실패를 시뮬레이션하여 프록시 터널에서의 교차 스트림 데이터 주입 및 응답 스머글링을 시연합니다.
// curl_http2_tunnel_mixup.c - Simulated libcurl handling CONNECT over HTTP/2
#include <stdio.h>
void handle_http2_stream(int stream_id) {
// Vulnerability: after CONNECT, the proxy mixes streams with the tunneled data
if (stream_id == 0) {
printf("CONNECT to target\n");
} else {
// Data from another stream may leak into the tunnel
printf("Stream %d data crosses tunnel boundary\n", stream_id);
}
}
int main() {
handle_http2_stream(0);
handle_http2_stream(1); // should be isolated
return 0;
}
libcurl의 HTTP/2 프록시 CONNECT 구현의 취약점으로, 터널이 설정된 후 스트림을 제대로 격리하지 못합니다. 하나의 HTTP/2 스트림을 제어하는 공격자는 별도의 터널에 데이터를 주입하여 응답 스머글링 또는 자격 증명 가로채기를 유발할 수 있습니다.
시뮬레이션을 컴파일하고 실행합니다:
gcc -o curl_http2_tunnel curl_http2_tunnel_mixup.c
./curl_http2_tunnel
출력은 스트림이 터널 경계를 넘는 것을 보여줍니다.