/

CVE-2026-91939

Severity:

CRITICAL RISK

(9.8)

PHP Object Injection (CWE-502) in Cotonti Comments Plugin

CVE-2026-91939

Deferred

Vulnerability type

Category:

PHP Object Injection

CWE:

CWE-502

Impact:

Remote Code Execution and Database Manipulation

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical PHP object injection vulnerability in the Cotonti Comments plugin occurs when attacker-controlled request data is passed to PHP's unserialize() without restricting permitted classes. Because the vulnerable input is reachable without authentication, an attacker may instantiate arbitrary PHP objects and trigger gadget chains that could manipulate database content or execute code.

Affected context

The vulnerability occurs in Cotonti 1.0.0 deployments where the Comments plugin processes the ci GET parameter through PHP deserialization. Risk is greatest when the application exposes the affected endpoint publicly and the runtime contains usable gadget chains or classes with dangerous magic methods and attacker-influenced properties.

Exploit preconditions

  • Attack surface: Publicly accessible Comments plugin request handling
  • Required access: No authentication may be required
  • Trigger point: Processing of the ci GET parameter
  • Why exploitation is possible: Attacker-controlled serialized data is deserialized without an allowed-class restriction, permitting arbitrary object instantiation and possible gadget-chain activation

Why this happens

The underlying flaw is unsafe deserialization, mapped to CWE-502: Deserialization of Untrusted Data. The application treats a request parameter as trusted serialized PHP data and invokes unserialize() without constraining which classes may be created. This insecure pattern can invoke object behavior during or after deserialization, allowing properties and magic methods to influence sensitive application operations.

Potential impact

  • An attacker may execute code in the application process
  • Database records could be modified, deleted, or poisoned
  • Application secrets and sensitive data could be exposed
  • The web application account or hosting environment could be compromised
  • Attackers could use the foothold for further lateral movement

General mitigation guidance

Mitigation generally focuses on removing unsafe deserialization from request-processing paths and reducing trust in client-controlled data.

Common defensive patterns include:

  • Avoiding PHP object deserialization for untrusted request parameters
  • Replacing serialized objects with narrowly defined, structured data formats
  • Applying strict allowlists for any unavoidable deserialization boundary
  • Validating type, structure, size, and business meaning before processing input
  • Keeping gadget-rich or privileged classes outside externally reachable flows
  • Running the application with least-privilege database and operating-system permissions
  • Protecting sensitive endpoints with authentication, authorization, and request integrity controls

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying unserialize() calls that consume request, cookie, or header data
  • Code review checks for missing class restrictions and deserialization before validation
  • Runtime monitoring for unusual serialized-object markers or anomalous parameter sizes
  • Web application firewall policies that flag suspicious serialized input patterns
  • Dependency and application inventory reviews for classes that can form dangerous gadget chains
  • CI policy enforcement that blocks unsafe deserialization APIs in internet-facing components

Sources

SourceLink
github.comgithub.com/Cotonti/Cotonti
github.comgithub.com/Cotonti/Cotonti/blob/1.0.0/plugins/comments/comments.setup.php
github.comgithub.com/Cotonti/Cotonti/blob/1.0.0/plugins/comments/controllers/actions/DisplayAction.php
github.comgithub.com/Cotonti/Cotonti/blob/1.0.0/plugins/comments/inc/CommentsWidget.php
github.comgithub.com/Cotonti/Cotonti/issues/1888
github.comgithub.com/Cotonti/Cotonti/pull/1889
vulncheck.comvulncheck.com/advisories/cotonti-1.0.0-comments-plugin-php-object-injection-via-ci-parameter

Frequently asked

questions

Yes. The affected request parameter is exposed through the Comments plugin, and exploitation may not require authentication when the endpoint is publicly reachable.

An attacker generally needs network access to the affected Cotonti application and the ability to submit requests to the vulnerable plugin functionality. No privileged account is necessarily required.

The safest pattern is to eliminate deserialization of attacker-controlled data and use validated, structured input instead. If deserialization cannot be avoided, tightly restrict permitted classes and isolate the processing path.

Enforce secure coding rules for deserialization, review all request-to-parser data flows, apply least privilege, and use automated static analysis and CI policies to detect unsafe APIs.

Find out what's already
exploitable in your codebase.