🇰🇷 한글 설명
CtrlPanel 1.1.1 이하의 관리자 설정 업데이트 엔드포인트가 사용자 입력으로부터 클래스 이름을 검증 없이 직접 수락하여 동적 인스턴스화함으로써 인증된 관리자에 의한 원격 코드 실행을 허용합니다. 공격자는 Composer 오토로더에 등록된 임의의 클래스 이름을 제공하여 PHP object injection을 통해 의도하지 않은 매직 메서드 실행이 가능합니다.
💡 쉬운 설명
CtrlPanel 관리자 설정에서 프로그램이 사용자가 보내는 클래스 이름을 검증 없이 실행하는 결함이 있습니다. 관리자 권한이 있는 공격자가 이를 악용하면 서버에서 임의의 코드를 실행할 수 있습니다.
🇺🇸 원문 (English)
CtrlPanel is open-source billing software for hosting providers. In versions 1.1.1 and prior, the admin settings update endpoint accepted a fully qualified class name directly from user-supplied request input and used it for dynamic static method calls and object instantiation without any allowlist validation, allowing for authenticated Remote Code Execution. An authenticated admin-level user could supply an arbitrary class name available in the Composer autoloader, potentially triggering unintended constructor or magic method execution. The update() method reads settings_class directly from the HTTP request and passed it to new $settings_class() and $settings_class::getValidations() without verifying that the provided value corresponds to a legitimate settings class: Because PHP resolves class names against the Composer autoloader at runtime, any autoloadable class in the application or its dependencies could be instantiated. Depending on the classes available in the dependency tree, this can trigger unintended side effects through constructors or magic methods (__construct, __toString, __wakeup), following a PHP object injection / gadget chain pattern. This issue has been fixed in version 1.2.0.
📍 영향받는 시스템
CtrlPanel 1.1.1 및 이전 버전
⚔️ 공격 벡터
인증된 관리자 계정으로 설정 업데이트 요청 시 settings_class 파라미터에 악의적 클래스 이름을 포함하여 PHP object injection 공격 수행
🛡️ 대응 방법
CtrlPanel을 1.2.0 이상으로 즉시 업그레이드하고 사용자 입력 클래스명에 대한 화이트리스트 검증 구현 필요
🔧 검증 코드
출력된 버전이 1.2.0 미만이면 취약함, 1.2.0 이상이면 패치됨
composer show ctrlpanel 2>/dev/null | grep -i version | awk '{print $NF}'