🇰🇷 한글 설명
Polr 오픈소스 URL 단축 서비스 2.3.0 미만 버전에서 발생하는 취약점으로, 설정 과정 중 관리자 권한을 탈취할 수 있습니다. SetupController의 느슨한 비교(==) 연산자 사용으로 인해 특정 쿠키 헤더를 포함한 요청을 보내면 계정이 없어도 관리자 권한을 획득할 수 있습니다.
💡 쉬운 설명
웹사이트를 처음 설정하는 단계에서 보안 검사를 허술하게 하는 허점을 이용한 공격입니다. 공격자가 특수한 값을 보내면 마치 관리자인 것처럼 속여 사이트의 모든 권한을 가져갈 수 있습니다.
🇺🇸 원문 (English)
Polr is an open source URL shortener. in Polr before version 2.3.0, a vulnerability in the setup process allows attackers to gain admin access to site instances, even if they do not possess an existing account. This vulnerability exists regardless of users' settings. If an attacker crafts a request with specific cookie headers to the /setup/finish endpoint, they may be able to obtain admin privileges on the instance. This is caused by a loose comparison (==) in SetupController that is susceptible to attack. The project has been patched to ensure that a strict comparison (===) is used to verify the setup key, and that /setup/finish verifies that no users table exists before performing any migrations or provisioning any new accounts. This is fixed in version 2.3.0. Users can patch this vulnerability without upgrading by adding abort(404) to the very first line of finishSetup in SetupController.php.
📍 영향받는 시스템
Polr version < 2.3.0
⚔️ 공격 벡터
/setup/finish 엔드포인트에 조작된 쿠키 헤더를 포함한 요청 전송
🛡️ 대응 방법
Polr를 2.3.0 버전 이상으로 업데이트하거나, SetupController.php의 finishSetup 함수 첫 줄에 abort(404)를 추가하여 패치합니다.
🔧 검증 코드
해당 취약점은 패키지 매니저가 아닌 소스 코드 레벨의 문제이므로, 설치된 Polr의 버전을 확인하거나 SetupController.php 파일의 코드를 직접 검토해야 합니다.
php -r "echo 'Polr version check required via manual file inspection';"
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
💻 영향받는 소프트웨어
IBM Security Verify Access