🇰🇷 한글 설명
WWBN AVideo 29.0 이하 버전의 objects/userSavePhoto.php는 base64 인코딩된 POST 파라미터를 받아 디코딩한 데이터를 프로필 사진 파일로 저장하며, CSRF 토큰·Origin/Referer 검증·MIME 검증이 없습니다. 이로 인해 공격자는 로그인한 사용자를 악성 페이지로 유도해 프로필 사진을 임의 데이터로 덮어쓸 수 있고, 요청마다 사이트 전체 캐시가 초기화됩니다. 수정 커밋 9c38468041505e637101c5943c5370c68f48e3ac에서 보완되었습니다.
💡 쉬운 설명
로그인한 사용자가 악성 웹페이지를 방문하면, 사용자 모르게 그 사람의 프로필 사진이 공격자가 정한 내용으로 바뀔 수 있습니다. 또한 이 과정에서 사이트의 캐시도 함께 지워집니다.
🇺🇸 원문 (English)
WWBN AVideo is an open source video platform. In versions up to and including 29.0, objects/userSavePhoto.php is a legacy profile-photo endpoint that accepts a base64 POST parameter and writes the decoded bytes to videos/userPhoto/photo<users_id>.png. Its only access control is User::isLogged(). It does not end in .json.php, so it is excluded from the project's global autoCSRFGuard (which is suffix-scoped in objects/include_config.php). There is no CSRF token, no Origin/Referer check, and no MIME validation of the decoded bytes. Because AVideo's default cookie policy is SameSite=None; Secure on HTTPS (objects/functionsPHP.php:227), an attacker who lures a logged-in user to a malicious page can overwrite that user's profile photo with arbitrary bytes and also triggers a site-wide clearCache(true) on every forged request. Commit 9c38468041505e637101c5943c5370c68f48e3ac contains an updated fix.
📍 영향받는 시스템
WWBN AVideo 29.0 이하 버전 (커밋 9c38468041505e637101c5943c5370c68f48e3ac 이전)
⚔️ 공격 벡터
로그인한 피해자를 악성 페이지로 유도하여 userSavePhoto.php에 위조된 CSRF 요청을 보내 프로필 사진을 덮어씀
🛡️ 대응 방법
AVideo를 수정 커밋 9c38468041505e637101c5943c5370c68f48e3ac이 포함된 최신 버전으로 업데이트
🔧 검증 코드
CSRF 검증 관련 코드(csrf 또는 토큰 검사)가 출력되면 수정이 적용된 것이고, 아무 결과도 없거나 isLogged만 보이면 취약한 상태일 가능성이 높습니다.
grep -n 'isLogged\|CSRF\|csrf' $(find / -name userSavePhoto.php 2>/dev/null | head -1) 2>/dev/null