/

CVE-2026-65603

Severity:

HIGH RISK

(8.8)

Privilege Escalation (CWE-269) in Grav Login Plugin

CVE-2026-65603

Awaiting Analysis

Vulnerability type

Category:

Privilege Escalation

CWE:

CWE-269

Impact:

Elevation to Super-Admin and Indirect Remote Code Execution

Severity:

HIGH RISK

(8.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 privilege escalation flaw in the Grav Login plugin's profile self-update handler allows authenticated low-privilege users to modify their own authorization fields when certain configuration options are enabled.

By submitting crafted profile update data that includes group or access information, an attacker can grant themselves super-admin rights, leading to full admin panel access and potential remote code execution via scheduler and Twig evaluation.

Affected context

This vulnerability occurs in Grav deployments using the Grav Login plugin with the default regular / DataUser backend and where administrators have configured plugins.login.user_registration.fields to include groups and/or access.

In this context, the authenticated profile self-update flow (update_user task / processUserProfile()) accepts and persists user-submitted authorization fields without sanitizing them, enabling privilege changes through normal profile update requests.

Exploit preconditions

  • Attack surface: Authenticated web interface for user profile editing (Login plugin profile update endpoint).
  • Required access: A valid low-privilege Grav user account capable of accessing the profile update functionality.
  • Trigger point: Submission of a crafted HTTP POST request to the profile self-update handler containing manipulated groups and/or access[...] fields (e.g., access[admin][super]=true).
  • Why exploitation is possible: The profile update handler does not strip or validate authorization-related fields (groups, access) from user-controlled form data, unlike the registration handler, so user accounts can directly modify their own privilege assignments when these fields are exposed by configuration.

Why this happens

The underlying issue is an authorization misconfiguration and insufficient privilege separation in the profile update logic, corresponding to CWE-269: Improper Privilege Management.

The code path responsible for handling authenticated user profile updates (processUserProfile() for the update_user task) trusts form input for fields that control group membership and access rights.

While the registration handler explicitly strips groups and access from user-submitted data, the profile update handler does not apply equivalent controls, creating an insecure pattern where authorization metadata is treated as regular user-editable profile data.

Conceptually, this reflects a broader bug class in which privilege-bearing attributes (roles, groups, capability flags) are not isolated from user-controlled input and are persisted directly to the user store.

Potential impact

  • Authenticated low-privilege users may escalate to super-admin within the Grav installation.
  • Attackers could gain full access to the Grav Admin Panel and its configuration capabilities.
  • Malicious use of the scheduler or other admin-managed automation could lead to remote code execution.
  • Twig template evaluation abuse can result in arbitrary code or sensitive data exposure.
  • Compromise of site content, user data, and application configuration integrity.

General mitigation guidance

Effective mitigation focuses on ensuring that authorization-related fields cannot be manipulated through normal user profile workflows and that privilege management remains under administrative control only.

Common defensive patterns include:

  • Explicitly separating profile data (e.g., name, email) from authorization metadata (groups, roles, access matrices), and never binding the latter to user-editable forms.
  • Implementing server-side whitelisting for updatable fields so only non-privileged attributes can be modified through self-service endpoints.
  • Centralizing privilege changes in dedicated administrative interfaces protected by strong authentication and authorization checks.
  • Using least-privilege defaults for all new accounts and ensuring privilege changes require out-of-band verification or elevated session context.
  • Employing secure-by-default plugin configurations that do not expose groups or access in user registration or profile editing fields.

How teams detect issues like this

Detection typically relies on a combination of configuration review, code inspection, and behavioral monitoring:

  • Static analysis and code review: Look for handlers that process profile or registration updates and accept groups, roles, access, or other authorization fields directly from request data. Flag any persistence of these fields without server-side enforcement.
  • Configuration audits: Examine plugin and application configuration to identify cases where administrative fields have been added to self-service user forms (e.g., user_registration.fields including groups or access).
  • Logging and monitoring: Monitor for sudden changes in user group assignments, especially transitions from regular users to administrative roles, and alert on anomalous privilege escalation patterns.
  • Policy enforcement: Apply application-level policies that prohibit editable privilege-related fields in generic form builders and enforce that any privilege modification undergoes additional checks or approvals.
  • Automated security testing: Use automated review tools or security-focused CI checks to flag routes where authorization attributes are user-controlled and to simulate privilege escalation attempts.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-h33v-82r9-v8pm
vulncheck.comvulncheck.com/advisories/grav-login-plugin-privilege-escalation-via-profile-update

Frequently asked

questions

Exploitability depends on the specific Grav configuration. It becomes practically exploitable when the Login plugin is using the default regular / DataUser backend and administrators have added groups or access fields to user-facing registration or profile forms, allowing authenticated users to submit privilege changes.

An attacker needs a valid low-privilege account with access to the profile update functionality. No prior administrative access is required; the escalation occurs by manipulating profile update requests once authenticated.

The safest fix pattern is to ensure that authorization-related attributes (groups, roles, access rules) are never writable via self-service user forms. Server-side logic should strictly control which fields can be updated in profile handlers, and any privilege-bearing fields must be removed from user-submitted data or overwritten with policy-enforced values.

Prevention hinges on designing clear boundaries between profile management and authorization management. Treat roles and access matrices as sensitive state that can only be changed through hardened administrative workflows, enforce field-level update policies, conduct regular code reviews of authentication and profile handlers, and avoid exposing privilege-control fields in configurable form builders without strong safeguards.

Find out what's already
exploitable in your codebase.