🇰🇷 한글 설명
@fastify/static 10.1.4 미만 버전에서 Windows나 macOS와 같은 대소문자 구분 없는 파일 시스템을 사용할 때 경로 제한을 우회할 수 있는 취약점이 발견되었습니다. 공격자가 경로의 대소문자를 변경하여 요청하면, 라우트 가드는 이를 다른 경로로 인식하여 통과시키지만 파일 시스템은 실제 보호된 파일로 접근을 허용하게 됩니다. 이로 인해 인증되지 않은 사용자가 설정된 경로 제한을 우회하여 보호된 정적 파일을 읽을 수 있습니다.
💡 쉬운 설명
파일 경로의 대소문자를 살짝 바꾸면 보안 검사를 통과하여 숨겨진 파일을 볼 수 있는 문제입니다. 윈도우나 맥처럼 대소문자를 구분하지 않는 컴퓨터 환경에서 특히 위험합니다.
🇺🇸 원문 (English)
@fastify/static is a Fastify plugin that serves static files from a configured root directory. In versions before 10.1.4, on a case-insensitive filesystem such as Windows or the default macOS volume, a route guard or allowedPath restriction can be bypassed by altering the letter case of a path segment. The route matcher is case-sensitive while the filesystem is not, so a request that changes the case of a protected segment does not match the guarded route and falls through to the static handler, yet the filesystem resolves it to the same protected file. As a result, an unauthenticated request can read a file that a route guard or allowedPath was configured to protect. The issue does not affect case-sensitive filesystems and is not a directory traversal, since nothing is served from outside the configured root. The issue is fixed in @fastify/static 10.1.4, which validates the requested path against its actual on-disk spelling and rejects case-aliased paths before authorization. As a workaround, serve static files from a case-sensitive filesystem, or ensure route guards and allowedPath rules account for every letter-case variant of the protected paths.
📍 영향받는 시스템
@fastify/static versions before 10.1.4 (on case-insensitive filesystems)
⚔️ 공격 벡터
보호된 경로의 대소문자를 변경하여 라우트 가드 및 allowedPath 제한을 우회하는 HTTP 요청 전송
🛡️ 대응 방법
@fastify/static 버전을 10.1.4 이상으로 업데이트하거나, 대소문자를 구분하는 파일 시스템에서 정적 파일을 서비스하십시오.
🔧 검증 코드
출력된 버전이 10.1.4 미만이면 취약한 상태이며, 10.1.4 이상이면 안전합니다.
npm list @fastify/static | grep '@fastify/static@'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
💻 영향받는 소프트웨어
Storage Protect Snapshot for Windows