GHSA-Q6GM-XFWR-44F5
Unauthenticated /replication endpoint leaks internal PostgreSQL replication telemetry (slot names + WAL LSNs)
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-Q6GM-XFWR-44F5 divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
### Summary
GET https://api.capgo.app/replication is publicly accessible (no authentication) and returns detailed internal PostgreSQL replication slot telemetry, including replication slot names and WAL/LSN positions (confirmed_flush_lsn, restart_lsn). This exposes sensitive operational/infrastructure details and provides an external health oracle.
### Details
In supabase/functions/_backend/public/replication.ts, the route is defined with CORS only:
- app.use('*', useCors)
- app.get('/', async (c) => { ... })
No authentication middleware is applied.
The response includes:
- slots[].slot_name (internal naming reveals backend components/providers/regions)
- slots[].confirmed_flush_lsn and slots[].restart_lsn (WAL positions)
- per-slot lag metrics and overall status
Additionally, the error handler is designed to return database error fields to the client (error_message, error_code, error_detail, error_hint) if an exception occurs, which increases information disclosure risk.
### PoC
curl -sk -i "https://api.capgo.app/replication" | sed -n '1,80p'Observed Result (example)
HTTP 200 with JSON containing internal telemetry, e.g.:
- slot_name: planetscale_subscription_*, supabase_realtime_*
- confirmed_flush_lsn: EC0/...
- restart_lsn: EC0/...
Impact
- Information disclosure useful for infrastructure reconnaissance (internal slot names, components, provider/region hints)
- Disclosure of WAL/replication state (LSNs)
- External health oracle (response code can be 200 vs 503 depending on lag thresholds)
Recommended Fix
- Restrict /replication to authenticated admin-only access or IP allowlist (internal monitoring), or
- If a public health endpoint is required, return only minimal status (e.g., {status, checked_at}) and remove slot names/LSNs and detailed telemetry.
- Do not return raw database error fields (error_detail, error_hint) to clients.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmcapgo |
Corregida | 12.128.2 | — | — |
12.128.2Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/Cap-go/capgo.app/security/advisories/GHSA-q6gm-xfwr-44f5Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
