Sceawere
Vulnerability Detail
CVE-2026-49400UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
October CMS PHP Object Injection
Vulnerability Metadata
- Severity
- Low
- Score / CVSS
- 3.3
- Creation Date
- 3h ago
- Vendor
- octobercms
- Product
- october
- Attack Type
- CWE-502: Deserialization of Untrusted Data
- Vector String
- CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:N
- Attack Complexity
- HIGH
Narrative and Response
Description
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.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "3.3",
"pubDate": "2026-09-14T18:17:49.513Z",
"pubdate": "2026-09-14T18:17:49.513Z",
"executiveSummary": "October CMS versions prior to 3.7.17 and 4.2.21 are susceptible to a PHP Object Injection vulnerability located within the Backend\\Traits\\SessionMaker trait. The flaw stems from the insecure deserialization of widget session state data, which utilized PHP's native serialize() and unserialize() functions without implementing class-allowlisting.\nThe vulnerability is primarily restricted to environments where the cms.safe_mode configuration is enabled. In standard production deployments, where administrative access is already limited to trusted entities, the risk profile is significantly lower. However, in multi-tenant or shared-editor environments, an authenticated attacker with access to the CMS markup editor could potentially exploit this flaw.\nSuccessful exploitation requires the attacker to inject a crafted serialized payload into a widget.* session key, which is subsequently processed by an insecure unserialize() call. By chaining this with available PHP gadgets present in the application's dependency set, an attacker could achieve arbitrary code execution or perform other unauthorized operations within the server's context. The vendor has remediated this by transitioning from native PHP serialization to JSON-based storage and strictly enforcing allowed_classes => false for legacy deserialization processes.",
"technicalDetails": "The root cause of the vulnerability resides in the implementation of the Backend\\Traits\\SessionMaker trait within October CMS. This trait was designed to manage widget session state by serializing data into a base64-encoded string, which was subsequently stored in the user's session. Upon retrieval, the application performed an insecure unserialize() operation on this data without applying an allowed_classes whitelist.\nIn PHP, the unserialize() function, when used on untrusted input, enables an attacker to instantiate arbitrary classes that are defined within the application's scope. If these classes contain magic methods (such as __wakeup(), __destruct(), or __toString()) that perform actions like file deletion, property manipulation, or further method calls, an attacker can construct a 'gadget chain' to achieve a range of malicious outcomes, including remote code execution.\nThe exploit path is contingent upon the cms.safe_mode setting. Safe Mode is a sandbox mechanism intended for environments where untrusted users are permitted to access the markup editor. An attacker who gains access to the markup editor can manipulate session data associated with widget states. Because the application blindly passes the stored base64-encoded string to unserialize() upon reading the session, the injection of a malicious object payload is processed during the next widget-read event.\nWhile standard backend operations that populate widget states (such as filtering or sorting) typically use a predefined array structure that does not permit arbitrary object injection, the Safe Mode sandbox provides the necessary interface for an attacker to influence the session-write path. By crafting a specific serialized payload and directing the application to store it within a widget.* session key, the attacker sets the stage for the injection.\nPost-exploitation impact includes the ability to trigger code execution based on the available gadget chains within the installed dependencies. The vulnerability does not affect standard production environments where Safe Mode is disabled, as the backend is restricted to trusted administrators who already possess the capability to execute PHP directly. The vendor's patch, applied in versions 3.7.17 and 4.2.21, resolves the issue by replacing the native serialization mechanism with JSON, which is immune to PHP object injection, and by enforcing strict class limitations on the legacy fallback deserialization routine."
}