CVE-2026-71294: Cotonti CMS Comments Plugin PHP Object Injection via Unrestricted unserialize() in Create/Edit Actions
Cotonti CMS's Comments plugin deserializes user-supplied data without restricting the classes that may be instantiated. In plugins/comments/controllers/actions/CreateAction.php, a ci POST parameter obtained via cotimport('ci', 'P', 'TXT') (trim-only sanitization) is passed to unserialize(base64decode($ci)) with no allowedclasses restriction, reachable by any member with write access to comments (the default Authmembers => 'RW' setting in plugins/comments/comments.setup.php). In plugins/comments/controllers/actions/EditAction.php, a cb parameter is similarly deserialized via unserialize(base64decode($this->comeback)) in prepareComeBack(), reachable by any member editing their own comment. Because unserialize() is called without allowedclasses, an attacker can construct a serialized PHP object of any class loaded by Cotonti (a PHP Object Injection primitive). This was demonstrated in practice using Cotonti's own MySQLcache class: a crafted serialized MySQLcache object, once deserialized and later garbage-collected, triggers its destruct()->flush() chain, causing an attacker-controlled INSERT INTO cotcache with attacker-chosen row values — confirming genuine POP-chain exploitation, with further impact (including potential RCE) contingent on other gadget chains available in a given Cotonti installation's loaded classes. A third sink in DeleteAction.php contains the identical unserialize() pattern but is gated behind an admin-only authorization check and is not reachable by ordinary members.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
In CreateAction.php, change the deserialization of the `ci` POST parameter so `unserialize()` does not instantiate arbitrary classes (e.g., use `unserialize(..., ['allowed_classes' => ...])` or avoid `unserialize` entirely).
Cotonti CMS Comments Plugin (plugins/comments/controllers/actions/CreateAction.php) unserialize(base64_decode($ci)) = Add `allowed_classes` (whitelist) or replace with a safe deserialization method - Configuration
In EditAction.php, change prepareComeBack() so the `cb`/`$this->comeback` value is not deserialized into arbitrary classes (e.g., use `unserialize(..., ['allowed_classes' => ...])` or avoid `unserialize` entirely).
Cotonti CMS Comments Plugin (plugins/comments/controllers/actions/EditAction.php) prepareComeBack() unserialize(base64_decode($this->comeback)) = Add `allowed_classes` (whitelist) or replace with a safe deserialization method - Compensating control
Temporarily restrict comment-writing/editing capabilities in plugins/comments to reduce exposure to the CreateAction/EditAction deserialization endpoints (the material notes default `Auth_members => 'RW'` enables member write access).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-71294?
CVE-2026-71294 has a severity rating of high, with a score of 7.7.
How do I fix CVE-2026-71294?
To fix CVE-2026-71294, restrict the classes allowed in the unserialize() function within the Comments plugin.
What kind of attack can be executed due to CVE-2026-71294?
CVE-2026-71294 can lead to PHP object injection attacks due to unrestricted deserialization of user input.
Which software is affected by CVE-2026-71294?
CVE-2026-71294 affects the Cotonti Comments Plugin for Cotonti CMS.
What is the potential impact of CVE-2026-71294?
The potential impact of CVE-2026-71294 includes code execution and data manipulation due to the vulnerability in deserialization.