/

CVE-2026-88864

Severity:

CRITICAL RISK

(9.1)

Broken Access Control (CWE-284) in Capgo SSO Table

CVE-2026-88864

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-284

Impact:

Unauthorized SSO enforcement and authentication disruption

Severity:

CRITICAL RISK

(9.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

Capgo exposes the public.sso_providers table through Supabase PostgREST without adequately restricting write access. A holder of an ordinary full API key may create an apparently active, enforced SSO provider without the intended enterprise, domain-verification, and Supabase Auth controls, potentially disrupting login for arbitrary domains.

Affected context

The issue occurs in Capgo deployments where the public.sso_providers table is directly writable through Supabase PostgREST by ordinary full API keys. The vulnerable trust boundary exists when SSO discovery and enforcement logic accepts database rows without ensuring that they were created through the protected backend provisioning workflow and completed the required verification and authorization steps.

Exploit preconditions

  • Attack surface: Supabase PostgREST access to the public.sso_providers table
  • Required access: An ordinary Capgo full API key with sufficient direct insert privileges
  • Trigger point: Creation of a database row indicating an active provider with SSO enforcement enabled
  • Why exploitation is possible: Database-level write controls do not adequately enforce the backend provisioning route, enterprise entitlement, domain ownership verification, provider status transitions, or trusted Supabase Auth provider identifiers
  • Resulting condition: The unauthenticated SSO domain-check endpoint may trust the forged row and report enforced SSO for a domain that was not legitimately configured

Why this happens

The vulnerability is caused by improper authorization at a direct data-access boundary. The application permits a caller with a broadly scoped API key to create records that should only be produced by a privileged provisioning workflow.

This maps to CWE-284: Improper Access Control because authorization and integrity requirements are not consistently enforced where the table is exposed. The SSO logic then treats client-insertable state as authoritative instead of deriving trust from controlled server-side operations and independently verified provider metadata.

Potential impact

  • An attacker could assert SSO enforcement for domains without verified ownership.
  • Normal login flows may be disrupted or redirected into attacker-controlled SSO conditions.
  • Users or organizations could experience authentication denial or account-access confusion.
  • The integrity of SSO provider configuration could be compromised.
  • Affected tenants may face support, availability, and trust impacts.

General mitigation guidance

Mitigation typically focuses on enforcing authorization and workflow integrity at every database and application boundary.

Common defensive patterns include:

  • Removing direct client or API-key write access to SSO provider configuration tables.
  • Restricting inserts and updates to a narrowly scoped server-side provisioning function.
  • Enforcing enterprise entitlement, domain ownership, provider identity, and status-transition checks on the server.
  • Treating only provider identifiers issued by the trusted identity-management system as authoritative.
  • Applying row-level security and least-privilege database roles with secure defaults.
  • Making unauthenticated discovery endpoints consume only independently verified, immutable configuration state.
  • Separating configuration submission from activation so pending records cannot influence enforcement decisions.
  • Auditing and revoking unnecessarily broad API keys and monitoring sensitive configuration changes.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static and dynamic analysis of database policies, PostgREST exposure, and API-key scopes.
  • Code review checks for direct client-writable security or authentication configuration tables.
  • Tests that attempt to create active records without completing entitlement and verification workflows.
  • Review of whether unauthenticated endpoints trust mutable database fields.
  • Policy enforcement requiring privileged server-side procedures for identity-provider changes.
  • Audit-log monitoring for unexpected inserts, status changes, or activation events in SSO configuration tables.
  • Automated security review tools that identify missing authorization checks and excessive data-plane write permissions.

Sources

SourceLink
github.comgithub.com/Cap-go/capgo.app/security/advisories/GHSA-xg7v-83qv-qfff
vulncheck.comvulncheck.com/advisories/capgo-sso-provider-authentication-bypass-via-postgrest-direct-write

Frequently asked

questions

Yes, where Supabase PostgREST is reachable and an attacker possesses an ordinary full Capgo API key that can write to the exposed table. The attack does not require access to the protected backend provisioning route.

The key prerequisite is a valid API key with sufficient direct insert privileges on the SSO provider table. Administrative access to the Capgo backend or Supabase Management API should not be necessary.

Remove direct write access and require all provider creation and activation to pass through a privileged server-side workflow that enforces entitlement, domain ownership, trusted provider identity, and valid status transitions.

Apply least-privilege API keys and database roles, use row-level security, test authorization boundaries, and ensure unauthenticated security decisions rely only on independently verified server-managed state.

Find out what's already
exploitable in your codebase.