/

CVE-2026-29002

Severity:

HIGH RISK

(7.2)

Insecure Direct Object Reference / Broken Authorization

CVE-2026-29002

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference / Broken Authorization

CWE:

CWE-639

Impact:

Privilege Escalation to SuperAdmin

Severity:

HIGH RISK

(7.2)

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

CouchCMS contains an access control flaw in its user management logic that allows Admin-level users to escalate their privileges to SuperAdmin by tampering with the f_k_levels_list parameter during user creation.

By modifying the role identifier in the HTTP request body, an authenticated Admin can bypass authorization validation and obtain full control over the application, including the ability to manage high-privilege accounts and system-wide settings.

Affected context

This vulnerability arises in CouchCMS deployments where:

  • Role or level identifiers (e.g., Admin vs SuperAdmin) are passed from the client to the server as modifiable parameters (such as f_k_levels_list).
  • The server-side logic trusts the submitted role ID and does not strictly enforce which roles an Admin is allowed to assign.
  • SuperAdmin account creation and high-privilege role assignment are intended to be restricted to a smaller set of trusted operators, but the enforcement is incomplete.

The risk is most pronounced in multi-admin environments where Admin logins are shared, delegated, or potentially exposed to insider threats.

Exploit preconditions

  • Attack surface: Web-based administrative interface for user management in CouchCMS.
  • Required access: Valid authenticated Admin-level account; no direct anonymous exploitation.
  • Trigger point: Creation (or modification) of a user account via an HTTP request that includes the f_k_levels_list parameter representing the role/permission level.
  • Why exploitation is possible: The server-side authorization checks fail to validate that an Admin is only allowed to create or assign roles up to their own privilege level. Instead, the system accepts any role ID present in f_k_levels_list, allowing a change from an allowed value (e.g., 4) to a restricted high-privilege value (e.g., 10) without additional verification.

Why this happens

The underlying issue is an insecure direct object reference in the authorization layer, mapped to CWE-639.

Rather than deriving allowed roles from trusted server-side state, the implementation relies on a client-supplied parameter (f_k_levels_list) to determine the role to be assigned. The server trusts this identifier without verifying whether the current user is authorized to grant that level of access. This pattern creates a privilege escalation vector where any user with access to the user management function can manipulate numeric or symbolic identifiers to reference higher-privilege roles that should not be assignable.

Potential impact

  • Elevation of an Admin-level account to SuperAdmin privileges.
  • Creation of new SuperAdmin accounts under attacker control.
  • Full access to application configuration, content, and administrative features.
  • Ability to manage, disable, or delete other user accounts, including legitimate SuperAdmins.
  • Potential for data exfiltration, tampering, or defacement across the entire CMS.
  • Increased blast radius if the CMS integrates with other systems or shares credentials/services.

General mitigation guidance

Mitigation should focus on hardening server-side authorization checks and reducing trust in client-controlled parameters:

  • Enforce server-side role assignment rules so that:
  • A user cannot grant a role higher than their own.
  • Only explicitly authorized operators or trusted bootstrap routines can create or manage SuperAdmin accounts.
  • Treat role IDs (such as values passed in f_k_levels_list) as untrusted input; validate against a permission model derived from the authenticated user's capabilities, not from what the client requests.
  • Centralize authorization decisions in a dedicated access control layer or policy engine, instead of scattering checks across UI handlers.
  • Implement defense-in-depth checks such as:
  • Whitelists of roles assignable by each role.
  • Independent server-side verification any time a high-privilege role is created or modified.
  • Reduce reliance on numeric "magic" role codes and instead use clearly defined role constants and mappings enforced on the server side.
  • Apply least privilege by limiting the number of Admin accounts and restricting who can access user management features.

How teams detect issues like this

Effective detection blends code-centric review with behavioral monitoring:

  • Static analysis / code review:
  • Look for endpoints that process user, role, or permission changes where role IDs are taken directly from request parameters (e.g., $_POST['f_k_levels_list']) and persisted without cross-checking against the current user's permissions.
  • Flag any logic where the calling user's role is not compared against the target role when creating or updating user records.
  • Check for missing or inconsistent policy enforcement, such as handlers that skip centralized authorization utilities.
  • Dynamic testing:
  • Use interception proxies to manipulate role-related parameters, attempting to assign roles beyond the tester's level and observing the server's response.
  • Add automated security tests that systematically fuzz role/level identifiers used in administrative workflows.
  • Operational monitoring:
  • Log and alert on suspicious patterns, such as:
  • Creation of SuperAdmin accounts by regular Admin users.
  • Sudden spikes in high-privilege role assignment events.
  • Periodically review privilege-change logs for anomalies.

Automated security testing tools and SAST/DAST solutions can assist by flagging weak authorization flows and unvalidated role parameters, but they should complement—not replace—manual review of access control logic.

Sources

SourceLink
gist.github.comgist.github.com/thepiyushkumarshukla/477e2d2bbbe8cc3ec0d640c50f0cf9e1
couchcms.comcouchcms.com/
vulncheck.comvulncheck.com/advisories/couchcms-privilege-escalation-via-f-k-levels-list-parameter

Frequently asked

questions

It is remotely exploitable in the sense that an attacker can exploit it over the network through the web interface, but they must already possess valid Admin-level credentials. It does not allow an unauthenticated attacker to directly compromise the system.

The attacker needs an authenticated Admin account or equivalent access to the user management functionality. With that foothold, they can tamper with the f_k_levels_list parameter during user creation or modification to obtain SuperAdmin privileges.

The most robust fix is to enforce strict, server-side authorization rules for role assignment. The server must determine which roles can be granted based on the authenticated user's permissions and ignore any client attempts to request higher roles. Only a tightly controlled mechanism should be able to create or modify SuperAdmin accounts.

Future prevention relies on designing access control so that all security decisions are made on the server, not derived from client input. Use centralized authorization checks, explicit role/permission models, and comprehensive tests that attempt to escalate privileges by manipulating IDs or parameters. Regular security reviews of administrative endpoints and automated checks for unvalidated role changes help catch regressions early.

Find out what's already
exploitable in your codebase.