🇰🇷 한글 설명
Open Source Point of Sale(opensourcepos) 3.4.0 버전부터 3.4.2 버전 이전까지의 버전에서_CSRF 보호 메커니즘이 비활성화되어 있어, 인증되지 않은 원격 공격자가 관리자 계정에 접근하여 시스템을 완전히 장악할 수 있는 취약점이 존재한다.
💡 쉬운 설명
opensourcepos의 일부 버전에서 CSRF 보호 기능이 비활성화되어 공격자가 시스템을 장악할 수 있는 취약점이 있습니다. 이는 공격자가 관리자 계정을 생성하여 시스템을 완전히 제어할 수 있습니다. 이 취약점은 3.4.2 버전에서 수정되었습니다.
🇺🇸 원문 (English)
Open Source Point of Sale (opensourcepos) is a web based point of sale application written in PHP using CodeIgniter framework. Starting in version 3.4.0 and prior to version 3.4.2, a Cross-Site Request Forgery (CSRF) vulnerability exists in the application's filter configuration. The CSRF protection mechanism was **explicitly disabled**, allowing the application to process state-changing requests (POST) without verifying a valid CSRF token. An unauthenticated remote attacker can exploit this by hosting a malicious web page. If a logged-in administrator visits this page, their browser is forced to send unauthorized requests to the application. A successful exploit allows the attacker to silently create a new Administrator account with full privileges, leading to a complete takeover of the system and loss of confidentiality, integrity, and availability. The vulnerability has been patched in version 3.4.2. The fix re-enables the CSRF filter in `app/Config/Filters.php` and resolves associated AJAX race conditions by adjusting token regeneration settings. As a workaround, administrators can manually re-enable the CSRF filter in `app/Config/Filters.php` by uncommenting the protection line. However, this is not recommended without applying the full patch, as it may cause functionality breakage in the Sales module due to token synchronization issues.
📍 영향받는 시스템
Open Source Point of Sale 3.4.0 ~ 3.4.2
⚔️ 공격 벡터
공격자는 관리자가 로그인한 상태에서 악의적인 웹 페이지를 호스팅하여, 브라우저가 비인가된 요청을 보내도록 유도할 수 있습니다.
🛡️ 대응 방법
최신 버전(3.4.2 이상)으로 업데이트하거나, app/Config/Filters.php에서 CSRF 필터를 수동으로 활성화할 수 있습니다. 그러나 수동 활성화는 전체 패치를 적용하지 않는 경우 Sales 모듈에서 기능 중단을 일으킬 수 있습니다.
🔧 검증 코드
로컬에서 Python을 실행하여, Open Source Point of Sale의 구성 파일에 접근하여 CSRF 필터 설정을 확인할 수 있습니다. 이 코드는 예제 도메인(example.com)을 사용하므로, 실제 시스템의 도메인으로 변경해야 합니다. 또한, 이 코드는 CSRF 필터 설정만 확인하며, 실제 취약점 여부를 완전히 판단하기 위해서는 추가적인 확인이 필요합니다.
python -c "import requests; print(requests.get('https://example.com/opensourcepos/app/Config/Filters.php').status_code == 200 and 'CSRF' not in requests.get('https://example.com/opensourcepos/app/Config/Filters.php').text)"