/

CVE-2026-56241

Severity:

HIGH RISK

(8.3)

Authorization Bypass (CWE-285) in Capgo Role Binding

CVE-2026-56241

Deferred

Vulnerability type

Category:

Authorization Bypass / Improper Access Control

CWE:

CWE-285

Impact:

Privilege Escalation and Unauthorized Administrative Actions

Severity:

HIGH RISK

(8.3)

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

Capgo contains an authorization flaw where users demoted from super_admin continue to access privileged RPCs because their stored rights are not fully cleared.

An attacker who previously held a super_admin role can continue to enumerate and delete non-compliant bundles organization-wide, even after their role is revoked.

Affected context

This vulnerability arises in Capgo deployments that rely on role bindings and the org_users.user_right column to manage administrative permissions.

It affects environments where users can be promoted to and later demoted from a super_admin role, but where historical rights data is not consistently invalidated.

The issue is triggered specifically when role binding deletions fail to clear or recalculate prior user_right values, leaving stale privileges active for certain RPC methods.

Exploit preconditions

  • Attack surface: Capgo RPC endpoints such as delete_non_compliant_bundles and count_non_compliant_bundles.
  • Required access: A valid Capgo account that previously had super_admin privileges and retains a stale org_users.user_right value.
  • Trigger point: Invocation of privileged RPCs after the user's super_admin role has ostensibly been revoked.
  • Why exploitation is possible: Role binding deletion does not fully synchronize or clear the org_users.user_right column, so the authorization logic continues to treat the user as having super_admin-level access to specific RPCs.

Why this happens

The underlying issue is improper authorization state management tied to CWE-285: Improper Authorization.

Instead of deriving permissions dynamically from current role bindings, the system persists user rights in org_users.user_right and fails to update or clear this field when roles are changed or removed.

This stale authorization data causes the access-control checks on certain RPCs to consult outdated privileges, effectively bypassing role revocation and enabling continued use of high-privilege operations.

Potential impact

  • An attacker could continue to bulk delete non-compliant bundles across the entire organization.
  • An attacker could enumerate non-compliant bundles indefinitely, gaining ongoing visibility into compliance-related data.
  • The organization's compliance posture could be undermined through unauthorized removal of evidence or artifacts.
  • Audit trails and governance workflows could be disrupted if privileged actions are performed by users who should no longer have administrative rights.

General mitigation guidance

Mitigation generally focuses on ensuring that authorization decisions are derived from authoritative, up-to-date role and binding data rather than cached or duplicated fields.

Recommended patterns include:

  • Centralizing permission checks so they compute effective privileges from current role bindings at request time.
  • Treating derived fields such as user_right as secondary or read-only views, and ensuring they are rebuilt or invalidated whenever role bindings change.
  • Implementing explicit revocation flows that clear or recompute all authorization-related columns when roles are demoted or removed.
  • Designing RPC handlers to require explicit, narrowly scoped privileges (least privilege) rather than broad super_admin checks, reducing blast radius when stale rights occur.
  • Adding defense-in-depth checks at the service or API gateway layer to enforce policy decisions independently of application-layer caching.

How teams detect issues like this

Detection efforts can focus on both code and runtime behaviors:

  • Static and code review:
  • Look for authorization decisions that rely on stored user_right or similar cached privilege indicators instead of querying current role bindings.
  • Flag patterns where role-binding deletion or update logic does not cascade changes to derived authorization fields.
  • Review RPC handlers such as delete_non_compliant_bundles and count_non_compliant_bundles to ensure they validate against current roles.
  • Automated analysis:
  • Configure linters or SAST rules to detect duplicated authorization state or non-normalized permission fields.
  • Use policy-as-code tools to assert that privileged RPCs must check role bindings directly.
  • Operational monitoring:
  • Monitor logs for privileged RPC calls originating from accounts that appear demoted or no longer flagged as super_admin.
  • Set alerts on anomalous bulk deletion patterns affecting non-compliant bundles.

Sources

SourceLink
github.comgithub.com/Cap-go/capgo/security/advisories/GHSA-rvvc-rvxv-qcrh
vulncheck.comvulncheck.com/advisories/capgo-rbac-demotion-privilege-retention-via-stale-org-users-user-right

Frequently asked

questions

Yes. Any user with network access to the Capgo service and a valid account that previously held super_admin privileges can exploit the issue by calling affected RPCs, provided their stale user_right entry remains.

The attacker must have had legitimate super_admin rights at some point and retained their account. After demotion, they can still invoke delete_non_compliant_bundles and count_non_compliant_bundles because the authorization state was not fully updated.

The safest approach is to recompute or invalidate all derived authorization fields whenever roles or bindings change, and to ensure RPC authorization logic uses current role bindings as the single source of truth. Any stale user_right or similar columns should be treated as non-authoritative or regenerated.

Adopt a robust RBAC design where permissions are evaluated from centralized role and policy definitions, avoid duplicating authorization state, and enforce strict change propagation when roles are modified. Complement this with regular authorization-focused code reviews, automated tests around role transitions, and monitoring for unexpected privileged actions.

Find out what's already
exploitable in your codebase.