🇰🇷 한글 설명
baserCMS의 위젯 영역 엔티티가 관리자 JSON API로 전달된 문자열 값을 직렬화 검증 없이 저장하고, 조회 시 allowed_classes 제한 없이 unserialize()로 역직렬화합니다. 관리자 권한(또는 XSS 등으로 위젯 쓰기 권한을 얻은 공격자)이 악성 객체를 심으면 비인증 페이지 요청으로 웹서버 권한의 명령 실행이 가능합니다. 5.3.2 및 5.4.2 버전에서 패치되었습니다.
💡 쉬운 설명
웹사이트 관리 기능에 저장된 특수 데이터가 페이지를 열 때마다 해석되면서 서버에서 명령이 실행될 수 있는 취약점입니다. 관리자 권한이 있는 사람이 이 데이터를 미리 심어두어야 공격이 가능합니다.
🇺🇸 원문 (English)
baserCMS is a website development framework. In versions 5.0.0 before 5.3.2 and 5.4.0 before 5.4.2, the widget-area entity serializes widgets only when the submitted value is an array, allowing a string submitted through the admin JSON API to be stored unchanged. Entity reads, including front-end rendering and API responses, deserialize the stored value with unserialize() without an allowed_classes restriction, accepting both raw and base64-encoded serialized data. An administrator, or an attacker who obtains widget-write capability through a separate vulnerability such as chained XSS, can plant an object graph that subsequently triggers on unauthenticated page requests. Two demonstrated gadget chains in the default dependency set use composer/composer ProcessExecutor::startJob() with Process::fromShellCommandline(), or logiscape/mcp-sdk-php StdioTransport::connect() with StdioServerParameters, to reach proc_open() and execute commands as the web-server user. Deserialization bypasses constructor-based readonly safeguards, and the stored payload can execute repeatedly until the database row is repaired. Unauthenticated page access is a trigger after privileged payload storage, not an unauthenticated means of initially planting the payload. This issue has been patched in versions 5.3.2 and 5.4.2.
📍 영향받는 시스템
baserCMS 5.0.0 ~ 5.3.1 및 5.4.0 ~ 5.4.1
⚔️ 공격 벡터
관리자 권한 또는 위젯 쓰기 권한을 획득한 공격자가 악성 직렬화 객체를 위젯 데이터로 저장하고, 이후 페이지 요청으로 역직렬화를 유발하여 명령을 실행합니다.
🛡️ 대응 방법
baserCMS를 5.3.2 이상 또는 5.4.2 이상으로 업데이트하고, 기존에 저장된 위젯 데이터를 점검 및 정리합니다.
🔧 검증 코드
출력된 버전이 5.3.2 미만(5.0.x~5.3.1) 또는 5.4.2 미만(5.4.0~5.4.1)이면 취약하며, 해당 버전 이상이면 패치가 적용된 것입니다.
grep -rE "'version'|\"version\"" $(find / -path '*baser*' -name 'version*' 2>/dev/null | head -5) 2>/dev/null | head -5