/

CVE-2026-56339

Severity:

HIGH RISK

(7.5)

Information Disclosure (CWE-203) in Capgo Supabase RPC

CVE-2026-56339

Deferred

Vulnerability type

Category:

Information Disclosure

CWE:

CWE-203

Impact:

Organizational Enumeration and Targeted Attack Facilitation

Severity:

HIGH RISK

(7.5)

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

An information disclosure flaw in Capgo's Supabase PostgREST RPC function public.rescind_invitation leaks whether an organization ID exists by returning distinct error messages.

When invoked using only a publishable API key, unauthenticated attackers can enumerate valid organization identifiers, expanding the potential attack surface for targeted phishing and social engineering campaigns.

Affected context

This vulnerability occurs in Capgo instances that expose the Supabase PostgREST RPC endpoint public.rescind_invitation backed by a SECURITY DEFINER function.

It becomes relevant when:

  • Calls to the function are allowed with a publishable (non-secret) API key
  • The function returns different error messages for non-existent organizations (NO_ORG) versus organizations where the caller lacks permissions (NO_RIGHTS)
  • Clients or third parties can freely probe organization IDs without strong authentication or rate limiting

Exploit preconditions

  • Attack surface: Publicly accessible Supabase PostgREST RPC endpoint public.rescind_invitation
  • Required access: Possession of a publishable API key or ability to invoke the endpoint with minimal credentials
  • Trigger point: Calling the RPC function with different candidate organization IDs and inspecting the returned error code or message
  • Why exploitation is possible: The SECURITY DEFINER function leaks authorization and existence details through distinguishable error responses, allowing attackers to infer whether an organization exists independent of access rights

Why this happens

The root cause is a side-channel in error handling logic where the RPC function exposes different failure modes based on resource existence and caller authorization.

This behavior maps to CWE-203: Information Exposure Through Discrepancy, in which the application reveals sensitive state (such as organization existence) because it returns inconsistent error codes or messages for closely related conditions.

In abstract terms, the function does not normalize its responses for unauthorized or invalid inputs, enabling an attacker to use the error channel as an oracle to enumerate valid identifiers.

Potential impact

  • Attackers can enumerate valid organization IDs across a Capgo deployment
  • Increased likelihood and effectiveness of targeted phishing or social engineering campaigns
  • Improved reconnaissance for adversaries planning account takeover or business email compromise
  • Potential correlation of organization identifiers with other leaked or public data to refine targeting

General mitigation guidance

Mitigation typically focuses on normalizing error responses and tightening access control to sensitive lookup operations.

Useful defensive patterns include:

  • Returning a single generic error for both non-existent and unauthorized resources to avoid existence oracles
  • Applying strict authentication and authorization checks prior to running SECURITY DEFINER functions that reference organizational data
  • Designing RPC functions so that they do not reveal internal identifiers or state in error channels
  • Implementing rate limiting and anomaly detection on endpoints that accept arbitrary identifiers to reduce enumeration viability
  • Minimizing reliance on publishable API keys for operations touching organizational or user-related metadata

How teams detect issues like this

Effective detection strategies often combine code-level review and behavioral monitoring:

  • Static or manual review of RPC and SECURITY DEFINER functions for branching logic that returns different errors based solely on resource existence
  • Policies requiring uniform error messages for authorization and existence failures in API endpoints
  • Log analysis to identify repeated requests against the same RPC function with varying organization IDs, indicating enumeration attempts
  • Automated testing frameworks that probe endpoints for distinguishable error conditions when given invalid or unauthorized identifiers

Sources

SourceLink
github.comgithub.com/Cap-go/capgo/security/advisories/GHSA-8432-3cgm-vw5j
vulncheck.comvulncheck.com/advisories/capgo-unauthenticated-organization-existence-enumeration-via-rescind-invitation-rpc

Frequently asked

questions

Not directly. The vulnerability primarily enables enumeration of valid organization IDs, which serves as reconnaissance to support further social engineering or targeted attacks.

An attacker typically needs only a publishable API key or equivalent low-privilege access that allows calling the public.rescind_invitation RPC endpoint, without requiring authenticated user accounts.

Normalize error handling so that both non-existent and unauthorized organization IDs produce the same generic response, and ensure that SECURITY DEFINER functions enforce robust authentication and authorization before revealing any state.

Adopt a consistent error-handling strategy that avoids leaking internal state, perform security-focused reviews of RPC and database functions, restrict the use of publishable keys to non-sensitive operations, and include tests that check for distinguishable error behaviors on invalid or unauthorized requests.

Find out what's already
exploitable in your codebase.