🇰🇷 한글 설명
Hono는 모든 JavaScript 런타임을 지원하는 웹 애플리케이션 프레임워크입니다. 4.12.25 이전 버전에서 AWS Lambda@Edge 환경의 CloudFront가 중복된 요청 헤더를 여러 개의 별도 항목으로 전달할 때, 어댑터가 Headers.append 대신 Headers.set을 사용해 마지막 값만 애플리케이션에 전달되어 X-Forwarded-For 등의 헤더가 잘려 나갑니다.
💡 쉬운 설명
같은 이름의 요청 헤더가 여러 개 와도 프레임워크가 마지막 값 하나만 남겨 버립니다. 그 결과 접근 제어나 감사 로그가 전체 요청 경로를 정확히 반영하지 못하게 됩니다.
🇺🇸 원문 (English)
Hono is a Web application framework that provides support for any JavaScript runtime. Prior to 4.12.25, on AWS Lambda@Edge, CloudFront delivers a request header that appears more than once as several separate entries. The adapter writes each value with Headers.set instead of Headers.append, so every value overwrites the previous one and only the last reaches the application. Repeated request headers such as X-Forwarded-For, Forwarded, and Via are silently truncated to a single value. Request middleware sees only the last value of a repeated header instead of the full chain. For applications that base access control on the X-Forwarded-For chain, this can weaken or alter that decision; for auditing, hop history is lost. This vulnerability is fixed in 4.12.25.
📍 영향받는 시스템
Hono 4.12.25 미만 버전을 AWS Lambda@Edge와 CloudFront 조합으로 사용하는 애플리케이션
⚔️ 공격 벡터
공격자가 중복 헤더를 포함한 요청을 보내 X-Forwarded-For 기반 접근 제어 판단을 왜곡하거나 감사 기록을 훼손할 수 있습니다.
🛡️ 대응 방법
Hono를 4.12.25 이상으로 업그레이드합니다.
🔧 검증 코드
출력된 hono 버전이 4.12.25 미만이면 취약하므로 업그레이드가 필요하고, 4.12.25 이상이면 패치가 적용된 것입니다.
npm ls hono 2>/dev/null | grep -E 'hono@'