🇰🇷 한글 설명
Gradio 애플리케이션의 경로 순회 취약점으로, Windows의 NTFS 대체 데이터 스트림(ADS) 문법을 이용하면 파일 접근 제한을 우회할 수 있습니다. blocked_path 기능이 'C:/tmp/secret.txt::$DATA' 형식의 ADS 경로를 제대로 필터링하지 못해 보호되어야 할 파일에 대한 무단 접근이 가능합니다.
💡 쉬운 설명
Windows 파일 시스템의 숨겨진 기능을 악용하면 차단된 파일을 읽을 수 있는 문제입니다. 마치 뒷문으로 같은 파일에 접근하는 방식이라고 생각하면 됩니다.
🇺🇸 원문 (English)
A vulnerability in the gradio-app/gradio repository, version git 67e4044, allows for path traversal on Windows OS. The implementation of the blocked_path functionality, which is intended to disallow users from reading certain files, is flawed. Specifically, while the application correctly blocks access to paths like 'C:/tmp/secret.txt', it fails to block access when using NTFS Alternate Data Streams (ADS) syntax, such as 'C:/tmp/secret.txt::$DATA'. This flaw can lead to unauthorized reading of blocked file paths.
📍 영향받는 시스템
Gradio (git commit 67e4044 및 해당 버전) - Windows OS에서만 영향
⚔️ 공격 벡터
Windows NTFS 대체 데이터 스트림(ADS) 문법(::$DATA)을 사용하여 blocked_path 필터링 우회
🛡️ 대응 방법
Gradio를 최신 버전으로 업데이트하고, 경로 검증 로직을 수정하여 ADS 문법을 포함한 모든 경로 변형을 필터링
🔧 검증 코드
설치된 Gradio 버전을 확인하고 보안 공지를 통해 권장되는 최신 버전과 비교하여 업데이트 필요 여부를 판단
pip show gradio | grep -i version