GHSA-RJ93-WMCH-2CRQ
Changing the API URL sends stored auth tokens to the new origin
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-RJ93-WMCH-2CRQ divulgada · CVSS 6.8 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
If a logged-in user is led to switch the frontend's API URL to an attacker's server (via phishing, or an induced hydration failure that leaves them on the API-URL screen), the frontend sends their stored bearer token, and on Vikunja Desktop their OAuth refresh token, to the new origin.
Details
- The access token and the desktop refresh token live in `localStorage` under keys that do not depend on the API origin (`frontend/src/helpers/auth.ts:19,71`).
- `checkAndSetApiUrl` (`frontend/src/helpers/checkAndSetApiUrl.ts:64-69`) switches `window.API_URL`, reconfigures the client and clears the query cache when the base changes, but leaves the tokens in place.
- The API client attaches `getToken()` to every request against whatever base is current (`frontend/src/client/http.ts:86-89`).
- Desktop token refresh posts the refresh token to `window.API_URL` (`frontend/src/helpers/auth.ts:228`).
The leak starts with the first authenticated call after the switch (`checkAuth`). The `/info` probe itself uses the unauthenticated `publicClient`.
Impact
Account takeover: the attacker's server receives a valid bearer token (and on desktop a refresh token it can keep using) and can act as the victim on the real instance. It requires the victim to enter or accept the attacker's API URL, which limits it to targeted social engineering.
Fix
Clear tokens and auth state whenever the API base actually changes, next to `queryClient.clear()` in `checkAndSetApiUrl`, so the user has to log in again against the new server.
_Found via internal security review (03 #2)._
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gocode.vikunja.io/api |
Sin parche | — | — | v0.24.6 afectada |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/go-vikunja/vikunja/security/advisories/GHSA-rj93-wmch-2crqLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
