🇰🇷 한글 설명
Hono 웹 프레임워크의 hono/proxy 모듈에 있는 proxy() 함수가 4.7.0부터 4.12.33 버전까지 원본 응답의 Connection 헤더에 명시된 헤더를 제거하지 않습니다. 이로 인해 원본 서버가 홉바이홉으로 선언한 내부 헤더가 클라이언트에게 전달될 수 있습니다. 이 문제는 4.12.34 버전에서 수정되었습니다.
💡 쉬운 설명
Hono 프레임워크로 만든 프록시 서버가 원래 서버 내부용으로만 써야 할 헤더를 그대로 외부 사용자에게 보낼 수 있습니다. 이 헤더에는 내부 시스템 정보가 담겨 있을 수 있어 노출 위험이 있습니다.
🇺🇸 원문 (English)
Hono is a Web application framework that provides support for any JavaScript runtime. From 4.7.0 to 4.12.33, the Proxy Helper proxy() function in hono/proxy does not remove response headers named by the origin's Connection header. Per RFC 9110 Section 7.6.1, an intermediary must remove the header fields listed in a message's Connection header field before forwarding the message, in addition to the well known hop by hop headers, but the proxy() function only removed the well known hop by hop headers, including Connection itself, from origin responses. A client may therefore receive response headers that the origin intended only for its immediate peer, disclosing connection scoped or internal metadata contained in such headers, when an application proxies responses from an origin that declares additional, non standard headers as hop by hop via the Connection response header. This issue is fixed in version 4.12.34.
📍 영향받는 시스템
Hono 4.7.0 이상 4.12.33 이하를 사용하며 hono/proxy의 proxy() 함수로 응답을 중계하는 애플리케이션
⚔️ 공격 벡터
원본 서버가 Connection 응답 헤더로 추가 헤더를 홉바이홉으로 지정하면, 프록시를 거쳐 클라이언트가 해당 내부 메타데이터 헤더를 받게 됨
🛡️ 대응 방법
Hono를 4.12.34 이상으로 업그레이드하고 npm update hono 또는 해당 패키지 매니저로 갱신
🔧 검증 코드
출력에 4.7.0부터 4.12.33 사이의 hono 버전이 나타나면 취약하며, 아무 결과도 없거나 4.12.34 이상이면 패치된 상태입니다.
npm ls hono 2>/dev/null | grep -E 'hono@4\.(7|8|9|10|11|12)\.'