🇰🇷 한글 설명
phpMyFAQ 4.0.16 及其以下版本存在授权逻辑缺陷,任何已验证的用户都可以访问/api/setup/backup端点,尽管他们没有相应的权限
💡 쉬운 설명
phpMyFAQ의 설정 백업 기능이 관리자 권한 없이도 모든 인증된 사용자가 접근할 수 있는 취약점이 발견되었습니다. 이 취약점으로 인해 사용자는 데이터를 백업하고 ZIP 파일의 경로를 얻을 수 있습니다. 이는 4.0.17 버전에서 해결되었습니다.
🇺🇸 원문 (English)
phpMyFAQ is an open source FAQ web application. Versions 4.0.16 and below have flawed authorization logic which exposes the /api/setup/backup endpoint to any authenticated user despite their permissions. SetupController.php uses userIsAuthenticated() but does not verify that the requester has configuration/admin permissions. Non-admin users can trigger a configuration backup and retrieve its path. The endpoint only checks authentication, not authorization, and returns a link to the generated ZIP. This issue is fixed in version 4.0.17.
📍 영향받는 시스템
phpMyFAQ 4.0.16 及其以下版本
⚔️ 공격 벡터
인증된 사용자가 /api/setup/backup 엔드포인트에 접근하여 데이터 백업 및 ZIP 파일 경로를 얻는 것
🛡️ 대응 방법
phpMyFAQ를 4.0.17 버전으로 업데이트 하거나, 사용자 인증 및 권한 검사를 강화하여 설정 백업 기능에 대한 접근을 제한합니다.
🔧 검증 코드
로컬에서 phpMyFAQ가 설치된 경우, 위의 Python 코드를 실행하여 취약점 여부를 확인합니다. 사용자 이름과 비밀번호를 실제로 사용하는 인증 정보로 대체합니다. 코드를 실행하기 위해서는 requests 라이브러리가 필요하며, pip install requests 명령으로 설치할 수 있습니다.
import requests
response = requests.get('http://localhost/phpmyfaq/api/setup/backup', auth=('사용자 이름', '비밀번호'))
if response.status_code == 200:
print({"result": "취약", "reason": "백업 endpoint에 대한 접근 성공"})
else:
print({"result": "양호", "reason": "백업 endpoint에 대한 접근 실패"})