GHSA-83F5-439G-PWMJ
Login CSRF / Session Fixation: console.capgo.app/login accepts access_token + refresh_token in URL query and auto-authenticates
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-83F5-439G-PWMJ divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
### Summary
https://console.capgo.app/login automatically authenticates a user when access_token and refresh_token are provided in the URL query string. Opening a crafted link in a fresh/incognito browser profile results in immediate login without user interaction. This enables login CSRF / session fixation (forcing a victim into an attacker-controlled session) and increases the risk of token exposure because tokens are accepted in query parameters.
### Details
In the webapp code, the login route parses tokens directly from the URL query parameters and sets the Supabase session:
- File: src/pages/login.vue
- Function: checkLogin()
- Logic:
_Reads access_token / refresh_token from new URLSearchParams(parsedUrl.search)
Calls supabase.auth.setSession({ access_token, refresh_token })
Proceeds to nextLogin()_
Because this happens automatically, any user who clicks a crafted link can be logged into the session represented by those tokens.
### PoC
1. Obtain valid access_token and refresh_token for a test account (my own session).
2. Open this URL in an incognito/new browser profile (no existing session/localStorage):
https://console.capgo.app/login?access_token=<ACCESS_TOKEN>&refresh_token=<REFRESH_TOKEN>- Result: the browser auto-logs in as the token owner (no prompt/confirmation).
Impact
- Login CSRF / session fixation: attacker can force a victim to adopt an attacker-controlled authenticated session by sending a crafted link.
- Token exposure risk: query-string tokens are more likely to be logged/stored (reverse proxies, analytics, browser history, screenshots) than URL fragments.
- Can lead to user confusion and actions performed under attacker session context.
### Recommended remediation
- Do not accept auth tokens via query parameters.
- Rely on standard provider flows (URL fragment only) and clear any fragment immediately after handling (history.replaceState).
- Bind token processing to an unguessable state/nonce and require explicit user confirmation before setting a session from URL-provided tokens.
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-83f5-439g-pwmjLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
