/

CVE-2026-55742

Severity:

CRITICAL RISK

(9.6)

CSRF (CWE-352) in Cotonti admin rights escalation

CVE-2026-55742

Deferred

Vulnerability type

Category:

Cross-Site Request Forgery (CSRF)

CWE:

CWE-352

Impact:

Privilege Escalation to Administrator (leading to potential Remote Code Execution)

Severity:

CRITICAL RISK

(9.6)

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

Cotonti 1.0.0 contains a Cross-Site Request Forgery flaw in the administration rights handler that allows unauthorized changes to group access permissions.

If an authenticated administrator is tricked into loading a malicious page, the attacker can silently submit forged requests that grant elevated rights to an attacker-controlled group, potentially leading to full administrative takeover and remote code execution.

Affected context

The vulnerability appears in the Cotonti CMS administration interface, specifically in the rights management functionality (system/admin/admin.rights.php).

It becomes relevant in deployments where:

  • Administrator sessions are active in a browser that can execute attacker-supplied HTML or JavaScript (e.g., via a separate tab, phishing email, or compromised site).
  • The rights update endpoint (a=update) is reachable over the network and relies on cookies or similar ambient credentials.
  • No additional confirmation or CSRF validation is enforced when adjusting group access rights.

In such environments, the browser may unknowingly submit state-changing requests on behalf of the administrator.

Exploit preconditions

  • Attack surface: HTTP POST/GET endpoint for administration rights updates (admin.rights.php?a=update).
  • Required access:
  • The attacker does not need direct access to the admin panel.
  • An administrator must be authenticated to Cotonti in the same browser session.
  • Trigger point:
  • The victim administrator is lured into visiting an attacker-controlled web page (or another compromised site) while logged in.
  • The page issues crafted requests to the rights update endpoint (e.g., via form auto-submit or hidden requests).
  • Why exploitation is possible:
  • The rights update action modifies group access rights without verifying an anti-CSRF token (no cot_check_xg() call).
  • Browsers automatically attach existing session cookies to cross-origin requests, so the application cannot distinguish the forged request from a legitimate admin action.

Why this happens

The root cause is a missing server-side verification of request authenticity for a state-changing operation in the admin panel.

Specifically, the rights update action in system/admin/admin.rights.php updates group permissions (including via cot_auth_add_group) without performing a CSRF token check using cot_check_xg().

This aligns with CWE-352: Cross-Site Request Forgery (CSRF), where the application relies solely on ambient credentials (cookies, session IDs) and does not require a per-request, unguessable token or equivalent confirmation for sensitive actions.

As a result, the browser becomes a confused deputy: it sends authenticated requests initiated from an untrusted origin, and the server treats them as legitimate administrative operations.

Potential impact

  • Attacker-controlled group may be granted elevated access rights, up to full administrative privileges.
  • Unauthorized modification of site configuration, plugin settings, and access control lists.
  • Template and content manipulation that can introduce backdoors or malicious code.
  • Indirect remote code execution via template editing, plugin configuration, or file upload features accessible to administrators.
  • Long-term compromise of the CMS instance, including creation of hidden admin accounts or persistent malicious groups.

General mitigation guidance

Effective mitigation focuses on enforcing strong request authenticity checks and minimizing the impact of any single administrative action:

  • Require a robust anti-CSRF mechanism (per-request, unpredictable tokens) for all state-changing admin operations, especially rights and configuration updates.
  • Centralize CSRF validation in reusable helpers and ensure all privileged handlers invoke them before processing updates.
  • Favor POST (or other non-idempotent) methods with CSRF tokens and avoid performing sensitive changes via GET requests.
  • Introduce explicit confirmation steps or re-authentication for high-risk actions such as granting admin-level rights or modifying templates.
  • Apply least-privilege principles to admin roles and groups so that not all accounts can directly gain full system control.
  • Consider separating configuration/template editing capabilities into a more restricted administrative tier.

These patterns reduce the risk of CSRF across the application and limit the blast radius if a single endpoint is misconfigured.

How teams detect issues like this

High-level detection typically combines code-level review with security testing:

  • Static analysis and code review:
  • Search for admin controllers or handlers that update permissions, roles, or configuration and verify that each calls a central CSRF validation routine (e.g., cot_check_xg()).
  • Flag any state-changing actions in the admin area that do not validate a CSRF token, or that accept changes over GET without additional safeguards.
  • Review form templates to ensure they include and correctly propagate CSRF tokens.
  • Security testing and QA:
  • Perform manual or automated CSRF testing for administrative endpoints by crafting cross-origin forms or XHR requests and observing whether changes are applied.
  • Use security scanners or CI-integrated tools that highlight missing CSRF protections on sensitive routes.
  • Policy and governance:
  • Enforce secure coding guidelines that mandate CSRF protection for all non-idempotent endpoints.
  • Include checks for CSRF coverage in pull-request templates and automated code review workflows.

Sources

SourceLink
github.comgithub.com/Cotonti/Cotonti
github.comgithub.com/Cotonti/Cotonti/blob/f43f1fc38ba4e02027786dad9dac1435c7c52b30/system/admin/admin.rights.php#L53

Frequently asked

questions

Yes, an attacker can exploit it remotely by hosting a malicious page and tricking an authenticated administrator into visiting it; the browser will then submit forged requests to the Cotonti instance.

The attacker does not need to know the credentials, but a valid administrator session must exist in the victim's browser. The attack piggybacks on the admin's authenticated session through CSRF.

Apply a consistent anti-CSRF mechanism to all state-changing administrative actions, ensuring each such endpoint requires and verifies a strong, per-session or per-request token before applying changes.

Adopt a framework-wide CSRF protection strategy, enforce it via coding standards and automated checks, and require explicit review of new or modified admin endpoints to confirm they use token validation and least-privilege design.

Find out what's already
exploitable in your codebase.