Summary
MaxSite CMS through version 109.6 unserializes data from the ci_session cookie without restricting the classes that may be created. Because the session encryption key is hardcoded, unauthenticated attackers may forge session cookies and inject PHP objects, potentially corrupting application state or enabling code execution when suitable gadget classes are available.
Affected context
The vulnerability occurs in MaxSite CMS deployments that use the affected session handling path and expose session cookies to unauthenticated clients. Risk increases when the application uses a hardcoded or otherwise exposed encryption key and its runtime contains classes with exploitable magic methods or gadget chains.
Exploit preconditions
- Attack surface: The HTTP session-handling functionality that processes the
ci_sessioncookie - Required access: No authenticated account is required; the attacker must be able to send requests to the application
- Trigger point: Session-cookie decoding and deserialization
- Why exploitation is possible: A hardcoded encryption key may allow attackers to create accepted cookie values, while unrestricted deserialization permits attacker-influenced PHP object instantiation
Why this happens
The underlying bug is unsafe deserialization of attacker-influenced session data. The application passes session content to PHP unserialize() without enforcing an allowed-class policy, so serialized objects can be reconstructed rather than limited to expected scalar session values. This behavior maps to CWE-502: Deserialization of Untrusted Data; the hardcoded encryption key further weakens the trust boundary by making cookie forgery more feasible.
Potential impact
- Attackers may corrupt or manipulate application session state
- The application may invoke unintended magic methods during object reconstruction
- Sensitive application behavior or data may be exposed
- Server-side code execution could occur when usable gadget classes are present
- The CMS process or its accessible resources could be compromised
General mitigation guidance
Mitigation generally focuses on removing executable object reconstruction from client-influenced session data and reducing the trust placed in cookies.
Common defensive patterns include:
- Replacing PHP object serialization with a format that represents only expected primitive values
- Applying strict allowlists when object deserialization cannot be eliminated
- Moving session state to server-side storage and using cookies only as opaque, integrity-protected identifiers
- Managing cryptographic keys through protected secret storage with controlled rotation rather than embedding them in application code
- Running the CMS with least-privilege filesystem, database, and operating-system permissions
- Invalidating sessions and rotating secrets when cookie forgery or key exposure is suspected
How teams detect issues like this
Organizations can detect related risks through:
- Static analysis searches for
unserialize()calls that process cookies, request parameters, or other client-controlled data - Code review checks for missing allowed-class restrictions and hardcoded encryption or signing keys
- Runtime monitoring for abnormal session-cookie sizes, formats, or repeated deserialization errors
- Policy enforcement that prohibits unsafe deserialization of externally supplied data
- Dependency and application security testing for magic-method gadget chains reachable from session processing
Automated review tools can help identify unsafe deserialization APIs and embedded secrets, but findings should be validated against the application's actual data flow.

