🇰🇷 한글 설명
@vitejs/plugin-rsc 0.5.8 버전 이전에서 개발 모드의 `/__vite_rsc_findSourceMapURL` 엔드포인트가 인증 없이 임의 파일 읽기를 허용한다. 공격자는 `filename` 쿼리 파라미터에 `file://` URL을 포함한 요청을 보내 Node.js 프로세스가 접근 가능한 모든 파일을 읽을 수 있다.
💡 쉬운 설명
Vite 개발 서버의 특정 엔드포인트에서 보안 확인 없이 파일을 읽어주는 문제가 있다. 공격자는 이를 이용해 서버의 모든 파일(설정, 데이터, 코드 등)을 몰래 볼 수 있다.
🇺🇸 원문 (English)
@vitejs/plugin-rs provides React Server Components (RSC) support for Vite. Prior to version 0.5.8, the `/__vite_rsc_findSourceMapURL` endpoint in `@vitejs/plugin-rsc` allows unauthenticated arbitrary file read during development mode. An attacker can read any file accessible to the Node.js process by sending a crafted HTTP request with a `file://` URL in the `filename` query parameter. Version 0.5.8 fixes the issue.
📍 영향받는 시스템
@vitejs/plugin-rsc 0.5.7 이하
⚔️ 공격 벡터
인증 없이 `/__vite_rsc_findSourceMapURL?filename=file:///etc/passwd` 형식의 요청으로 서버의 임의 파일 접근
🛡️ 대응 방법
@vitejs/plugin-rsc를 0.5.8 이상으로 업그레이드
🔧 검증 코드
표시되는 버전이 0.5.8 미만이면 취약함, 0.5.8 이상이면 안전함
npm list @vitejs/plugin-rsc 2>/dev/null | grep @vitejs/plugin-rsc