Capgo - Information Disclosure via Unauthenticated /replication Endpoint
Description
Capgo before 12.128.2 contains an information disclosure vulnerability in the unauthenticated /replication endpoint that exposes internal PostgreSQL replication telemetry including slot names and WAL LSN positions. Attackers can access this endpoint without authentication to retrieve sensitive infrastructure details such as replication slot names, confirmed_flush_lsn, restart_lsn values, and database error messages for reconnaissance purposes.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1Patches
Vulnerability mechanics
Root cause
"Missing authentication middleware on the /replication endpoint allows unauthenticated access to internal PostgreSQL replication telemetry."
Attack vector
An attacker sends a GET request to `https://api.capgo.app/replication` without any authentication credentials [ref_id=1]. The server responds with a JSON payload containing internal PostgreSQL replication slot names (which reveal backend components, providers, and regions), WAL/LSN positions (`confirmed_flush_lsn`, `restart_lsn`), per-slot lag metrics, and overall status [ref_id=1]. If an exception occurs, the error handler additionally returns raw database error fields such as `error_detail` and `error_hint`, further increasing information disclosure risk [ref_id=1].
Affected code
The unauthenticated `/replication` endpoint is defined in `supabase/functions/_backend/public/replication.ts` with only CORS middleware (`app.use('*', useCors)`) and no authentication middleware [ref_id=1]. The route returns raw PostgreSQL replication slot telemetry including `slot_name`, `confirmed_flush_lsn`, `restart_lsn`, per-slot lag metrics, and overall status, and the error handler exposes database error fields (`error_message`, `error_code`, `error_detail`, `error_hint`) to the client [ref_id=1].
What the fix does
The advisory recommends restricting the `/replication` endpoint to authenticated admin-only access or an IP allowlist for internal monitoring [ref_id=1]. If a public health endpoint is required, it should return only minimal status (e.g., `{status, checked_at}`) and remove slot names, LSNs, and detailed telemetry, and must not return raw database error fields (`error_detail`, `error_hint`) to clients [ref_id=1]. The patch does not show the exact code changes, but the remediation guidance is to add authentication middleware or an IP allowlist and sanitize the response payload.
Preconditions
- authNo authentication required; the endpoint is publicly accessible
- networkAttacker must be able to send HTTP GET requests to the Capgo API server
Generated on Jun 21, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2- github.com/Cap-go/capgo/security/advisories/GHSA-q6gm-xfwr-44f5mitrevendor-advisory
- www.vulncheck.com/advisories/capgo-information-disclosure-via-unauthenticated-replication-endpointmitrethird-party-advisory
News mentions
0No linked articles in our index yet.