Summary
Capgo exposes webhook signing secrets to non-admin API keys through Supabase REST access, due to overly permissive row-level security on the webhooks table.
Attackers who can query this table may read the secret and forge valid X-Capgo-Signature headers, causing receivers to trust spoofed webhook events and undermining authenticity and integrity.
Affected context
This vulnerability arises in Capgo deployments where Supabase REST access to the webhooks table is available to non-admin API keys without strict row-level security controls.
It is most relevant when webhook signing secrets are stored in plaintext in the same table used for operational webhook configuration, and downstream receivers rely solely on X-Capgo-Signature validation for trust decisions.
The issue manifests when application logic assumes API keys are equivalent to administrative credentials and does not differentiate access scopes for sensitive configuration data.
Exploit preconditions
- Attack surface: Supabase REST API endpoint exposing the webhooks table.
- Required access: Possession of a non-admin Capgo API key with the ability to query webhook-related records.
- Trigger point: Issuing read operations (e.g., SELECT via REST) against the webhooks table to obtain the signing secret.
- Why exploitation is possible: Row-level security policies fail to restrict sensitive columns or records to administrators only, allowing secrets to be included in responses to lower-privileged principals.
Why this happens
The underlying issue is a misconfigured data access control pattern, where sensitive secrets are stored alongside general configuration and exposed without adequate row-level or column-level restrictions.
In terms of CWE-200 (Information Exposure), the design trusts Supabase REST and API keys for separation of access but does not enforce fine-grained policies that prevent non-admin keys from reading high-value secrets.
This leads to an information disclosure condition where webhook signing secrets, intended to remain private and server-side, become accessible to any principal that can perform read queries on the webhooks table.
Potential impact
- Attackers may forge webhook requests that appear authenticated to downstream receivers.
- Malicious actors can manipulate business workflows that depend on Capgo webhooks (e.g., provisioning, billing, or deployment triggers).
- Integrations relying on webhook integrity can be abused for data tampering or unauthorized state changes.
- Systems consuming webhooks may experience replay attacks or injection of fraudulent events.
General mitigation guidance
Effective mitigation typically focuses on reducing the exposure of secrets and hardening data access boundaries.
Common defensive patterns include:
- Separating webhook signing secrets into a dedicated, locked-down storage mechanism with strict row- and column-level controls.
- Applying least-privilege row-level security rules so that non-admin API keys cannot read sensitive configuration or secret-bearing columns.
- Implementing role-based access control where only privileged service identities can retrieve or rotate webhook secrets.
- Designing webhook verification to include additional contextual checks (such as timestamps and unique IDs) so a single static secret is not the sole trust anchor.
- Periodically rotating webhook secrets and treating them as credentials, with lifecycle management and audit.
How teams detect issues like this
Organizations can detect similar information exposure issues by:
- Reviewing Supabase (or equivalent) row-level and column-level security policies for tables containing secrets or credentials.
- Using static or configuration analysis to flag schemas that store secrets in plaintext and expose them through general-purpose APIs.
- Implementing logging and anomaly detection around API calls that enumerate or fetch webhook configuration, especially from non-admin keys.
- Enforcing policy checks in CI/CD that disallow direct REST exposure of tables holding security-sensitive data unless explicit controls are documented.

