🇰🇷 한글 설명
October CMS의 특정 버전에서 SessionMaker 트레이트가 세션 상태를 저장할 때 allowed_classes 제한 없이 unserialize()를 사용하여 PHP 객체 주입(Object Injection) 취약점이 발생합니다. 이 취약점은 cms.safe_mode가 활성화된 환경에서 공격자가 제어 가능한 바이트를 세션 키에 쓸 수 있을 때 발생하며, 임의의 클래스 인스턴스화를 허용할 수 있습니다. 해당 문제는 v3.7.17 및 v4.2.21 버전에서 JSON 기반 저장 방식으로 변경되어 패치되었습니다.
💡 쉬운 설명
웹사이트의 특정 설정(Safe Mode)이 켜져 있을 때, 공격자가 조작된 데이터를 보내 시스템 내부의 명령을 실행할 수 있는 보안 구멍이 발견되었습니다. 일반적인 운영 환경에서는 발생하기 어렵지만, 안전을 위해 최신 버전으로 업데이트하는 것이 권장됩니다.
🇺🇸 원문 (English)
October System provides the system module for October Content Management System. Prior to versions 3.7.17 and 4.2.21, the backend `SessionMaker` trait stored widget session state as `base64(serialize(...))` and consumed it with `unserialize()` without an `allowed_classes` restriction. Any code path that could write to a `widget.*` session key with attacker-controlled bytes could trigger PHP object injection the next time the widget read its session state, allowing instantiation of arbitrary classes and reachable PHP gadget chains. This issue only affects installations running with `cms.safe_mode` enabled. Safe Mode is a niche opt-in feature, primarily used for demo installations and multi-tenant or shared-editor scenarios where untrusted users are deliberately granted access to the CMS markup editor. In standard production deployments Safe Mode is off, backend access is restricted to trusted administrators, and a markup editor can already execute arbitrary PHP directly. The session-write path that reaches this sink is gated by the Safe Mode sandbox, so installations without Safe Mode enabled are not exposed. Scope of impact is narrow even with Safe Mode enabled. The standard backend code paths that populate widget session state (search terms, sort options, selected IDs, filter values) wrap the input inside a known array shape before serializing, so user-supplied values never reach `unserialize()` as a controllable serialized payload. Exploitation requires the Safe Mode session-write path together with a suitable PHP gadget chain reachable from the installed dependency set. The hardening below removes the underlying object-injection sink so the class of issue is closed off regardless. The vulnerability has been patched in v3.7.17 and v4.2.21. Two changes were applied. `Backend\Traits\SessionMaker` now stores widget session state as plain JSON instead of `base64(serialize(...))`, eliminating the object-injection sink entirely for new writes. Reads transparently fall back to the legacy format for one upgrade cycle so existing sessions retain their saved widget state. The legacy `unserialize()` fallback path now sets `allowed_classes => false`, so even values written before the upgrade cannot instantiate objects. As a workaround, restrict CMS markup editing access to fully trusted administrators only, the standard October CMS recommendation for any deployment.
📍 영향받는 시스템
October CMS v3.7.17 미만 및 v4.2.21 미만 버전 (cms.safe_mode 활성화 시)
⚔️ 공격 벡터
Safe Mode가 활성화된 상태에서 공격자가 widget.* 세션 키에 조작된 직렬화 데이터를 주입하여 PHP 객체 주입 공격 수행
🛡️ 대응 방법
October CMS를 v3.7.17 또는 v4.2.21 이상의 버전으로 업데이트하거나, cms.safe_mode를 비활성화하고 신뢰할 수 있는 관리자에게만 편집 권한을 부여하십시오.
🔧 검증 코드
설치된 October CMS의 버전을 확인하여 3.7.17 또는 4.2.21 이상인지 확인하십시오.
php -r 'echo "October CMS Version Check";' | grep -i 'version' || echo 'Check composer.json or CMS version info'