🇰🇷 한글 설명
next-video 라이브러리 2.8.1 미만 버전에서 발생하는 경로 탐색 취약점입니다. 인증되지 않은 공격자가 URL 쿼리 파라미터를 조작하여 설정된 비디오 디렉토리를 벗어나 서버 내의 민감한 JSON 파일들을 읽을 수 있습니다. 이를 통해 암호화 키, 빌드 매니페스트, 경로 정보 등 애플리케이션의 중요 데이터가 노출될 수 있습니다.
💡 쉬운 설명
비디오를 보여주는 기능의 허점을 이용해 해커가 서버 안에 숨겨진 중요한 설정 파일들을 몰래 훔쳐볼 수 있는 문제입니다. 마치 집 안의 특정 방만 보여줘야 하는데, 문틈을 이용해 집 전체의 비밀 서류를 들여다보는 것과 같습니다.
🇺🇸 원문 (English)
next-video is a library for adding video to Next.js applications. Prior to 2.8.1, the GET endpoint exported by next-video/request-handler and commonly mounted at /api/video accepts an unauthenticated url query parameter, while src/utils/utils.ts isRemote() treats any value without an HTTP or HTTPS prefix as a local path. src/request-handler.ts passes that value through src/assets.ts getAssetPath() to src/config.ts loadAsset(), which appends a JSON suffix and uses fs.readFile without canonicalizing the path or verifying that it remains inside the configured video folder. A remote attacker can therefore escape the intended asset directory and read JSON files accessible to the application process, including Next.js server-action encryption material, preview-mode keys, build manifests, route metadata, absolute paths, and application video asset identifiers. Applications that do not expose the runtime request handler are not affected through this route. This issue is fixed in version 2.8.1.
📍 영향받는 시스템
next-video library versions prior to 2.8.1
⚔️ 공격 벡터
인증되지 않은 사용자가 /api/video 엔드포인트의 URL 쿼리 파라미터에 경로 탐색 문자열을 삽입하여 공격
🛡️ 대응 방법
next-video 라이브러리를 2.8.1 버전 이상으로 업데이트하십시오.
🔧 검증 코드
명령어 결과에 2.8.1 미만의 버전이 나타나면 취약한 상태이며, 아무 결과도 나오지 않으면 안전합니다.
npm list next-video | grep -E 'next-video@([0-1]\.|2\.[0-7]\.)'
💻 영향받는 소프트웨어
IBM Security Verify Access