/

CVE-2026-56300

Severity:

HIGH RISK

(7.5)

Information Exposure (CWE-200) in Capgo RPC API Keys

CVE-2026-56300

Deferred

Vulnerability type

Category:

Information Exposure

CWE:

CWE-200

Impact:

Credential Intelligence and Account Enumeration

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

Capgo before 12.128.2 exposes unauthenticated security definer RPC functions that act as API key validity oracles and leak user UUIDs and permission information.

An attacker using only the public API key can validate compromised keys, enumerate users and apps, and infer permission levels, amplifying the impact of any leaked credentials.

Affected context

This vulnerability arises in Capgo deployments where unauthenticated clients can invoke security definer RPC functions over the public API.

Specifically affected are the get_user_id and get_org_perm_for_apikey functions, which reveal whether an API key is valid and disclose user UUIDs and organizational permissions.

The issue is most relevant in environments that rely on API keys for access control, and where keys may be shared, logged, or otherwise exposed outside strict secrecy channels.

Exploit preconditions

  • Attack surface: Public-facing Capgo RPC API endpoints callable with a public API key
  • Required access: Ability to send unauthenticated requests using the public API key
  • Trigger point: Invocation of get_user_id or get_org_perm_for_apikey with candidate API keys or identifiers
  • Why exploitation is possible: The security definer functions run with elevated privileges and return detailed validity and identity information without enforcing an authentication boundary

Why this happens

The root cause maps to CWE-200: Information Exposure, where sensitive operational data is returned to untrusted callers.

In this case, security definer RPC functions are designed to introspect API keys and permissions but fail to restrict who can call them or what information is disclosed.

As a result, they inadvertently expose key validity oracles, user UUIDs, and permission metadata, turning internal access-control logic into an externally consumable information channel.

Potential impact

  • Attackers can validate whether leaked or guessed API keys are still active or correctly scoped
  • Adversaries may enumerate users and associated apps by correlating user UUID disclosures
  • Threat actors can map organizational permission levels, improving targeted attack planning
  • Increased actionability of previously low-value credential leaks, enabling more efficient account takeover attempts

General mitigation guidance

Effective mitigation focuses on tightening information boundaries around authentication and authorization logic.

Common patterns include:

  • Restricting sensitive RPC functions to authenticated and authorized callers, or removing public exposure entirely
  • Minimizing data returned from introspection endpoints, avoiding direct disclosure of UUIDs or detailed permission structures
  • Designing API key validation mechanisms that do not provide binary oracles to unauthenticated users, and that respond with generic, non-informative messages
  • Applying least-privilege to security definer functions so they operate within narrowly scoped roles aligned with their intended use
  • Establishing clear policies for what identity and permission data may be exposed via public APIs, and codifying these rules in design reviews

How teams detect issues like this

Organizations can detect similar information exposure issues by:

  • Reviewing RPC and API endpoint definitions for security definer or elevated-privilege functions callable without authentication
  • Using static analysis or schema inspection to flag endpoints that return identity, key validity, or permission metadata to unauthenticated clients
  • Conducting focused code reviews around authentication and key management logic, checking for oracular responses and excessive detail in error messages
  • Applying API governance policies that require classification of returned data and explicit approval for exposing identifiers and permissions externally
  • Leveraging automated API security testing tools to probe endpoints for enumeration and oracle behaviors under unauthenticated conditions

Sources

SourceLink
github.comgithub.com/Cap-go/capgo/security/advisories/GHSA-7r6g-whg3-5mm4
vulncheck.comvulncheck.com/advisories/capgo-unauthenticated-api-key-validity-and-permission-oracle-via-rpc-functions

Frequently asked

questions

Not by itself. It does not grant direct login capabilities but significantly improves an attacker's ability to confirm valid credentials and target accounts more effectively.

An attacker only needs access to the public-facing API and the public API key; no prior authentication or privileged role is required to call the vulnerable RPC functions.

Restrict these security definer RPC functions to authenticated and authorized callers, reduce the sensitivity of data returned, and ensure introspection logic does not act as a validity oracle for credentials.

Establish strict design rules around identity and permission data exposure, perform security reviews for new RPC/API endpoints, and enforce that authentication and authorization logic never reveal detailed validity or enumeration information to unauthenticated clients.

Find out what's already
exploitable in your codebase.