/

CVE-2026-100612

Severity:

HIGH RISK

(7.2)

Broken Access Control (CWE-639) in Capgo SSO Providers

CVE-2026-100612

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-639

Impact:

Vertical Privilege Escalation and Account Takeover

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

Capgo contains an incomplete access-control fix that leaves the provider_id field of SSO provider records writable by authorized organization administrators. An attacker who already has org_admin access in an organization with active SSO may redirect the organization's trust relationship to an IdP they control, potentially causing account takeover, privilege escalation, and owner lockout.

Affected context

The issue occurs in Capgo deployments using the public.sso_providers table and PostgREST-based updates. It is relevant when an organization has an active SSO provider, organization administrators can update provider records, and row-level policies restrict target rows without restricting sensitive columns such as provider_id. The vulnerable configuration can allow a tenant administrator to alter the identity provider used as the trust anchor for an email domain.

Exploit preconditions

  • Attack surface: PostgREST access to SSO provider records
  • Required access: An authenticated user holding the org_admin tier permission, including org.update_settings, in the target organization
  • Target state: The organization has an active SSO provider configured
  • Trigger point: An update to the SSO provider's writable identity-provider reference
  • Why exploitation is possible: The access-control guard protects selected fields but does not restrict provider_id, while broad table grants and row-level policies permit the authorized administrator to modify the trust-anchor column

Why this happens

The underlying flaw is an incomplete authorization boundary at the column level. A database trigger freezes several security-sensitive fields, but leaves provider_id writable, and the table grants and row-level policies do not compensate for that omission.

This maps to CWE-639: Authorization Bypass Through User-Controlled Key, because a user with limited administrative authority can influence the identifier used to select or trust an identity provider. The insecure pattern is treating row-level authorization as sufficient while allowing a lower-privileged principal to change a security-critical relationship within the authorized row.

Potential impact

  • An attacker may redirect SSO validation to an identity provider they control.
  • An attacker could authenticate while asserting an organization owner's email identity.
  • The application may attach the attacker's SSO identity to an existing privileged account.
  • The legitimate owner's password, identities, or sessions could be invalidated.
  • The attacker may gain organization-owner or super-admin privileges.
  • Legitimate users could be locked out and organizational data or settings could be exposed or altered.

General mitigation guidance

Mitigation generally requires treating the identity-provider binding as a security-critical, immutable relationship rather than an ordinary organization setting.

Common defensive patterns include:

  • Enforcing column-level authorization for provider_id, metadata_url, and attribute-mapping fields.
  • Allowing only a narrowly scoped, separately authorized workflow to create or replace an SSO trust anchor.
  • Using database permissions, views, stored procedures, or dedicated APIs that expose only approved fields for each role.
  • Ensuring row-level policies and field-level controls jointly enforce least privilege.
  • Requiring independent verification and strong reauthentication for changes to identity-provider configuration.
  • Preventing lower-privileged organization administrators from modifying authentication trust anchors.
  • Auditing provider changes and applying alerts, approval workflows, and rollback controls.
  • Preserving existing credentials and identities until a validated ownership-change process is complete.

How teams detect issues like this

High-level detection can combine database, application, and source-code review:

  • Review grants and privileges on SSO configuration tables, with particular attention to anon and authenticated roles.
  • Inspect row-level policies and triggers for column coverage, checking whether security-sensitive identifiers remain writable.
  • Use static analysis and code review rules to flag broad update endpoints for authentication or identity-provider records.
  • Test authorization matrices by role, verifying that organization administrators cannot change trust-anchor fields.
  • Monitor audit logs for changes to provider_id, identity-provider metadata, domain bindings, and privileged-account identities.
  • Alert on SSO configuration changes followed by unusual owner authentication, identity replacement, session invalidation, or privilege changes.
  • Automated security review tools may help identify mismatches between table grants, row-level policies, and field-level authorization.

Sources

SourceLink
github.comgithub.com/Cap-go/capgo.app/security/advisories/GHSA-jpjp-v827-j4gc
vulncheck.comvulncheck.com/advisories/capgo-sso-provider-id-authentication-bypass-via-incomplete-migration

Frequently asked

questions

It can be exploitable through the application's PostgREST update surface when that endpoint is reachable and the attacker satisfies the required authorization conditions.

The attacker must already hold the organization's org_admin permission and the target organization must have an active SSO provider. This is not an unauthenticated attack.

Apply explicit field-level authorization to the SSO trust anchor and expose provider changes only through a narrowly controlled workflow with independent verification.

Treat authentication configuration as privileged security state, review grants and row-level policies together, test authorization by field and role, and monitor all changes to identity-provider bindings.

Find out what's already
exploitable in your codebase.