🔍 CVE-2024-23340

5.3
CVSS Score
MEDIUM
2024-01-22
2026-06-17 07:12
✅ 완료

🇰🇷 한글 설명

@hono/node-server v1.3.0부터 도입된 Request 객체의 url 속성이 '..' (double dots) 경로를 제대로 해석하지 못하는 결함이 있습니다. 이로 인해 serveStatic 기능을 사용할 경우 의도하지 않은 경로로 접근이 가능한 보안 취약점이 발생할 수 있습니다.

💡 쉬운 설명

웹 서버가 주소에 포함된 '상위 폴더로 이동' 명령을 제대로 처리하지 못해, 원래 보여주면 안 되는 파일에 접근할 수 있는 문제입니다. 최신 브라우저에서는 자동으로 수정되어 안전하지만, 특수한 도구를 사용하면 위험할 수 있습니다.

🇺🇸 원문 (English)

@hono/node-server is an adapter that allows users to run Hono applications on Node.js. Since v1.3.0, @hono/node-server has used its own Request object with `url` behavior that is unexpected. In the standard API, if the URL contains `..`, here called "double dots", the URL string returned by Request will be in the resolved path. However, the `url` in @hono/node-server's Request as does not resolve double dots, so `http://localhost/static/.. /foo.txt` is returned. This causes vulnerabilities when using `serveStatic`. Modern web browsers and a latest `curl` command resolve double dots on the client side, so this issue doesn't affect those using either of those tools. However, problems may occur if accessed by a client that does not resolve them. Version 1.4.1 includes the change to fix this issue. As a workaround, don't use `serveStatic`.

📍 영향받는 시스템

@hono/node-server v1.3.0 ~ v1.4.0

⚔️ 공격 벡터

URL에 '..'를 포함하여 서버의 정적 파일 경로를 우회하는 경로 조작 공격

🛡️ 대응 방법

@hono/node-server를 v1.4.1 이상으로 업데이트하거나, 취약한 버전에서는 serveStatic 사용을 지양하십시오.

🔧 검증 코드

출력된 버전이 1.3.0 이상 1.4.0 이하인지 확인하십시오.

Shell / Script
npm list @hono/node-server

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

💻 영향받는 소프트웨어

Node.js