/

CVE-2026-56257

Severity:

HIGH RISK

(7.1)

Authorization Flaw (CWE-284) in Capgo Ownership APIs

CVE-2026-56257

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-284

Impact:

Privilege Escalation and Data Access Inconsistency

Severity:

HIGH RISK

(7.1)

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 broken authorization control in Capgo allows direct modification of app ownership metadata via PostgREST without passing through the intended transfer_app() workflow.

Under certain conditions, an attacker can create split-brain ownership where one organization retains access to version data while another controls the app record, leading to confusing and insecure access boundaries.

Affected context

This vulnerability affects Capgo deployments that expose PostgREST-backed endpoints for manipulating app ownership records.

It manifests when the public.apps.owner_org field can be updated directly, without coordinated updates to related tables such as app_versions.owner_org and without enforcing the transfer_app() workflow.

Environments where ownership metadata is spread across multiple tables and not atomically updated are especially susceptible to split-brain states.

Exploit preconditions

  • Attack surface: API endpoints exposed via PostgREST that allow write access to public.apps.owner_org
  • Required access: Ability to authenticate or otherwise obtain credentials or roles that can perform direct updates on app ownership fields
  • Trigger point: Issuing an update to apps.owner_org while leaving app_versions.owner_org unchanged, effectively bypassing the transfer_app() workflow
  • Why exploitation is possible: Authorization checks are insufficiently coupled to the higher-level ownership transfer process, allowing direct field changes that violate consistency constraints and access control assumptions

Why this happens

The core issue is a broken access control pattern where low-level database fields governing ownership can be modified independently of the sanctioned transfer_app() workflow.

Instead of enforcing that all ownership changes flow through a controlled, transactional process, the system allows direct writes to public.apps.owner_org via PostgREST.

This maps to CWE-284, as authorization policies fail to restrict sensitive operations that affect who controls app records and associated data, resulting in inconsistent ownership metadata and unintended access paths.

Potential impact

  • Attacker-controlled organization may gain ownership of app records without correctly transferring underlying version data
  • Previous organization keys may continue to access version data, leading to unauthorized retention of data access
  • Confusing split-brain ownership states that complicate incident response and access auditing
  • Potential misuse of app records and version data by different organizations with divergent intentions
  • Increased risk of data leakage or policy violations due to inconsistent enforcement of ownership constraints

General mitigation guidance

Effective mitigation focuses on enforcing ownership changes through a single, constrained workflow and eliminating direct updates to sensitive ownership fields.

Common defensive patterns include:

  • Centralizing ownership transfer logic in an application-level function or service that performs atomic, cross-table updates
  • Restricting PostgREST or similar data access layers from directly updating ownership-related columns, using database policies or views
  • Implementing strong row-level security and role-based access control for ownership metadata so only dedicated workflows can modify it
  • Applying integrity constraints or triggers to prevent inconsistent ownership states between apps and app_versions
  • Designing ownership changes to be transactional and auditable, with clear logs of who initiated transfers and when

How teams detect issues like this

Organizations can identify this class of issue through:

  • Code and schema reviews focused on ownership-related tables, looking for columns that can be modified outside sanctioned workflows
  • Analysis of PostgREST configuration, policies, and database row-level security to ensure sensitive fields are not directly writable
  • Database audit logging that flags changes to apps.owner_org and app_versions.owner_org, especially when they diverge
  • Static analysis or policy-as-code checks that enforce patterns such as "no direct writes to ownership fields" and "all ownership changes must use transfer workflows"
  • Periodic integrity checks to detect split-brain ownership states where related tables reference different owning organizations

Sources

SourceLink
github.comgithub.com/Cap-go/capgo/security/advisories/GHSA-v9jp-r5wh-qqcp
vulncheck.comvulncheck.com/advisories/capgo-authorization-bypass-in-app-ownership-transfer-via-direct-postgrest-update

Frequently asked

questions

Exploitability depends on how widely the affected PostgREST endpoints are exposed and what roles can modify ownership fields. If many internal or external actors can update public.apps.owner_org, the risk is significantly higher.

An attacker must be able to authenticate or otherwise obtain capabilities that permit updates to apps.owner_org via PostgREST or a similar interface. They do not need direct database access if the API layer exposes this functionality.

The safest approach is to remove direct write access to ownership-related columns and route all ownership changes through a dedicated transfer_app() or equivalent workflow that performs atomic, consistent updates across all relevant tables under strict authorization checks.

Preventing similar problems requires designing authorization policies around business operations rather than individual columns, enforcing row-level security for sensitive metadata, limiting direct CRUD access through generic data access layers, and regularly reviewing schemas and APIs for fields that should only be modified by controlled workflows.

Find out what's already
exploitable in your codebase.