🇰🇷 한글 설명
오픈소스 소셜 미디어 예약 도구인 Postiz에서 인증 없이 발생할 수 있는 경로 탐색 취약점입니다. 공격자는 URL 인코딩된 경로 구분자를 사용하여 업로드 디렉토리를 벗어나 시스템의 임의 파일을 읽을 수 있으며, 이를 통해 JWT 서명 비밀키와 데이터베이스 연결 문자열 등 민감한 정보를 탈취할 수 있습니다. 탈취한 비밀키를 이용하면 관리자 권한을 포함한 모든 사용자의 세션을 위조하여 무기한 접속이 가능합니다.
💡 쉬운 설명
해커가 특수한 주소를 입력하여 서버에 저장된 중요한 비밀 파일들을 몰래 훔쳐볼 수 있는 문제입니다. 이 비밀을 알아내면 비밀번호 없이도 관리자 계정으로 로그인하여 시스템을 완전히 장악할 수 있습니다.
🇺🇸 원문 (English)
Postiz is an open-source social media scheduling tool. The route that serves locally stored media joins URL-supplied path segments onto the upload directory and streams the file without normalising the path or confining it to that directory, and the route requires no authentication. Raw dot-segments are collapsed before routing, but URL-encoded separators survive route matching and are decoded only once they reach the handler, restoring the traversal at the filesystem call. An unauthenticated remote attacker can therefore read any file readable by the application process, including the process environment, which exposes the JWT signing secret, the database connection string, and connected provider and billing secrets. Because session tokens are signed with that secret and carry no expiry, this allows forging a non-expiring session as any user, including an administrator, without a password.
📍 영향받는 시스템
Postiz (버전 정보 미지정, 취약한 경로 탐색 로직 포함 버전)
⚔️ 공격 벡터
인증되지 않은 원격 공격자가 URL 인코딩된 경로 탐색 문자열을 사용하여 파일 시스템에 접근
🛡️ 대응 방법
업로드 디렉토리 경로 정규화(Normalization)를 적용하고, 파일 접근 시 경로 제한(Chroot/Sandboxing) 및 인증 절차를 구현해야 함
🔧 검증 코드
명령어 실행 결과 HTTP 200 OK와 함께 /etc/passwd 파일의 내용이 출력되면 취약한 상태임
curl -I 'http://<target-ip>/media/%2e%2e%2f%2e%2e%2fetc/passwd'