🇰🇷 한글 설명
OpenList 4.2.3 미만 버전의 offline-download 기능에서 경로 탐색(Path Traversal) 취약점이 발견되었습니다. 공격자가 조작된 Content-Disposition 헤더를 통해 임시 디렉토리를 벗어나 시스템 내 임의의 파일을 생성, 수정 또는 덮어쓸 수 있습니다. 이 문제는 관리자 권한이 없는 일반 사용자도 실행할 수 있는 API 경로를 통해 발생합니다.
💡 쉬운 설명
파일을 다운로드하는 기능의 허점을 이용해, 공격자가 원래 저장되어야 할 위치가 아닌 컴퓨터의 다른 중요한 파일을 마음대로 만들거나 바꿀 수 있는 문제입니다. 마치 택배 기사가 물건을 지정된 현관 앞이 아닌 집 안 거실에 마음대로 두고 가는 것과 같습니다.
🇺🇸 원문 (English)
OpenList a file list program that supports multiple storage. Prior to 4.2.3, OpenList's offline-download feature at POST /api/fs/add_offline_download with tool: "SimpleHttp" accepts an attacker-supplied URL and saves its bytes under a per-task temporary directory before transferring them to the user's destination storage. The temporary filename comes from the attacker-controlled Content-Disposition header, is passed from parseFilenameFromContentDisposition in internal/offline_download/http/util.go to filepath.Join(task.TempDir, filename) in SimpleHttp.Run in internal/offline_download/http/client.go, and is opened with os.Create without a containment check. Because filepath.Join cleans .. segments, a non-admin user with PermAddOfflineDownload on any path can traverse out of task.TempDir and create, truncate, or overwrite any file writable by the OpenList process whose parent directory already exists. The server/handles/offline_download.go AddOfflineDownload route uses normal user authentication rather than AuthAdmin, and local-storage destinations fall through tryPutUrl in internal/offline_download/tool/add.go to the vulnerable SimpleHttp.Run path. This issue is fixed in version 4.2.3.
📍 영향받는 시스템
OpenList 버전 4.2.3 미만
⚔️ 공격 벡터
POST /api/fs/add_offline_download 요청 시 Content-Disposition 헤더에 경로 탐색 문자열(..)을 포함하여 전송
🛡️ 대응 방법
OpenList를 최신 보안 패치가 적용된 버전 4.2.3 이상으로 업데이트하십시오.
🔧 검증 코드
명령어 결과에 4.2.0에서 4.2.2 사이의 버전이 나타나면 취약한 상태입니다.
openlist --version 2>/dev/null | grep -E '4\[\.\]2\.[0-2]'