🇰🇷 한글 설명
AVideo 8.1.0 이전 버전에서 인증되지 않은 스트리머 로그인 경로(objects/login.json.php)의 user 파라미터가 SQL 쿼리에 이스케이프 없이 삽입되어 SQL 인젝션이 발생합니다. 이를 통해 공격자는 인코더 데이터베이스의 임의 데이터(스트리머 자격 증명, 허용 목록, 큐 기록 등)를 인증 없이 읽을 수 있으며, 탈취된 스트리머 자격 증명으로 업스트림 접근이 지속될 수 있습니다.
💡 쉬운 설명
로그인 입력란에 특수한 문자를 넣어 서버 데이터베이스의 내용을 몰래 조회할 수 있는 취약점입니다. 공격자는 계정 정보 없이도 저장된 인증 정보를 빼낼 수 있습니다.
🇺🇸 원문 (English)
AVideo is a video-sharing Platform. Prior to 8.1.0, the unauthenticated streamer login at `objects/login.json.php` passes the `user` parameter to `Streamer::get` in `objects/Streamer.php`, where it is interpolated into a single-quoted MariaDB SELECT without parameterization or escaping. Although `objects/security.php` strips literal single quotes, `html_entity_decode` in `objects/Login.php` restores entity-encoded quotes before the query. The supplied `siteURL` must pass the streamer allowlist, which allows all sites when empty by default, and an attacker-hosted login response must set `canUpload` or `isAdmin` to reach `Streamer::createIfNotExists`. That function calls `Streamer::get` before its additional allowlist check. UNION results are exposed through `streamers_id`, while failures return the rendered query and MariaDB error. An attacker can read arbitrary encoder database data, including stored upstream streamer credentials, allowlist configuration, and queue records, without encoder credentials. Stacked statements are not permitted by the mysqli driver and the tested database account lacks global FILE privilege, so the demonstrated vector is bounded to reads rather than server-side file writes. Stolen streamer credentials can provide continued upstream access until rotated. This issue is fixed in version 8.1.0.
📍 영향받는 시스템
AVideo 8.1.0 미만 버전 (objects/login.json.php, Streamer.php 포함 설치 환경)
⚔️ 공격 벡터
미인증 상태에서 login.json.php의 user 파라미터에 HTML 엔티티 인코딩된 따옴표와 UNION 구문을 삽입해 DB 데이터를 조회
🛡️ 대응 방법
AVideo를 8.1.0 이상으로 업그레이드하고 노출되었을 수 있는 스트리머 자격 증명을 즉시 교체
🔧 검증 코드
출력된 버전 번호가 8.1.0 미만이면 취약하며, 8.1.0 이상이면 패치가 적용된 상태입니다.
grep -rn "version" /var/www/html/AVideo/version.php 2>/dev/null | head -5