Skip to main content
Vulnerability Database/CVE-2026-100612

CVE-2026-100612: Capgo SSO Privilege Escalation Vulnerability

CVE-2026-100612 is a privilege escalation flaw in Capgo that allows org_admin users to hijack owner accounts through SSO provider manipulation. This article covers the technical details, affected versions, and security implications.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-100612 Overview

Capgo (capgo.app) through version 12.261.0 contains an incomplete access-control fix in the public.sso_providers table that enables vertical privilege escalation. The migration 20260826100000_sso_providers_block_direct_active_insert.sql installs a BEFORE UPDATE trigger that freezes only four columns, leaving provider_id, metadata_url, and attribute_mapping writable. An attacker holding org_admin permissions can PATCH provider_id through PostgREST to redirect SSO trust to an identity provider they control. This results in full account takeover of the organization owner. No patched version is available at the time of publication.

Critical Impact

An authenticated org_admin can hijack the organization owner account, null its password, and terminate all other sessions by rebinding the SSO trust anchor to an attacker-controlled identity provider.

Affected Products

  • Capgo (capgo.app) through version 12.261.0
  • Deployments running migration 20260826100000_sso_providers_block_direct_active_insert.sql
  • Instances exposing the public.sso_providers table via PostgREST to the anon and authenticated roles

Discovery Timeline

  • 2026-09-26 - CVE-2026-100612 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-100612

Vulnerability Analysis

The flaw is a Broken Access Control weakness classified under CWE-639, Authorization Bypass Through User-Controlled Key. The enforce_sso_provider_client_update_guard() trigger function enforces immutability on dns_verified_at, domain, status, and enforce_sso, but omits provider_id from its column checks. The public.sso_providers table is granted ALL privileges to the anon and authenticated roles with no column-level GRANT restrictions.

PostgreSQL row-level security policies such as allow_org_admins_update_sso_providers govern only which rows a role may update, not which columns. The combination permits any user holding the org.update_settings capability to issue a PATCH against the row and overwrite the trust anchor.

Once provider_id is rewritten, the server-side SSO merge routine attaches the attacker's SSO identity to the existing owner account, nulls the password, and deletes other identities and sessions. The legitimate owner is locked out while the attacker inherits owner or super_admin privileges.

Root Cause

The root cause is an incomplete allowlist in the BEFORE UPDATE trigger paired with coarse table-level GRANT ALL privileges. The migration author assumed row-level security would scope mutations, but RLS in PostgreSQL does not restrict column selection within an authorized row. The provider_id column was never added to the guard function, leaving the SSO trust anchor mutable by any role authorized to update the row.

Attack Vector

The attacker must already hold org_admin with the org.update_settings capability in a target organization that has an active SSO provider configured. The attacker issues a PostgREST PATCH to the sso_providers row for their organization, replacing provider_id with the identifier of an attacker-controlled identity provider. The attacker then initiates SSO login asserting the organization owner's email address. The server matches the rewritten provider_id to the attacker's IdP, accepts the assertion, and merges the identity into the owner account.

Detection Methods for CVE-2026-100612

Indicators of Compromise

  • PostgREST PATCH requests against /sso_providers originating from accounts without the owner or super_admin role
  • Unexpected changes to the provider_id, metadata_url, or attribute_mapping columns in public.sso_providers
  • SSO login events for an organization owner immediately following modifications to the sso_providers row
  • Password reset to null and bulk deletion of identities or sessions for an owner account

Detection Strategies

  • Enable PostgreSQL audit logging (pgaudit) on the public.sso_providers table to capture every UPDATE statement with the acting role and changed columns
  • Correlate PostgREST access logs with database audit records to attribute mutations to specific authenticated users
  • Alert on any UPDATE to sso_providers where the acting role is not the organization owner or a service account

Monitoring Recommendations

  • Monitor the identity merge routine for events that null a password and delete sibling identities in the same transaction
  • Track SSO assertions where the asserted email domain belongs to an organization owner but the IdP endpoint recently changed
  • Review all historical sso_providers rows for provider_id values that do not match the originally provisioned IdP

How to Mitigate CVE-2026-100612

Immediate Actions Required

  • Revoke table-level GRANT ALL on public.sso_providers from the anon and authenticated roles and replace with explicit column-level grants
  • Extend the enforce_sso_provider_client_update_guard() function to also freeze provider_id, metadata_url, and attribute_mapping
  • Audit all sso_providers rows for unauthorized provider_id changes and reset them to the legitimate IdP identifiers
  • Rotate owner credentials and force reauthentication for all organization owners

Patch Information

No patched version is available at the time of publication. Operators should apply the workarounds below and monitor the GitHub Security Advisory GHSA-jpjp-v827-j4gc and the VulnCheck Advisory for release updates.

Workarounds

  • Replace GRANT ALL on public.sso_providers with narrow column-level GRANT UPDATE statements that exclude the SSO trust columns
  • Add provider_id, metadata_url, and attribute_mapping to the BEFORE UPDATE trigger allowlist to raise an exception on modification
  • Temporarily disable PostgREST write access to sso_providers and manage SSO configuration through an administrative service account only
  • Require out-of-band verification before applying any change to an organization's SSO provider binding
bash
# Example PostgreSQL hardening for public.sso_providers
REVOKE ALL ON public.sso_providers FROM anon, authenticated;
GRANT SELECT ON public.sso_providers TO authenticated;
GRANT UPDATE (dns_verified_at) ON public.sso_providers TO authenticated;

-- Extend the trigger guard to cover the trust anchor columns
-- ALTER FUNCTION enforce_sso_provider_client_update_guard()
--   to raise an exception when NEW.provider_id IS DISTINCT FROM OLD.provider_id

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.