llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · code.vikunja.io/api

GHSA-FRF4-3PRF-3VCH

Login CSRF via form-encoded login and OIDC callback on /api/v2

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
4.6
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición28 dDesde la divulgación, 22 oct 2026, 5:00 a. m.
Detección27 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
22 oct 26
18 nov 26
19 nov 26
22 oct 26
29 oct 26
5 nov 26
12 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-FRF4-3PRF-3VCH divulgada · CVSS 4.6 (GitHub)
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
An attacker with an account on the instance gets a victim's browser to submit a cross-site HTML form to v2 `/login` or the v2 OIDC callback, carrying the attacker's credentials or OIDC code. The response sets the refresh cookie for the attacker's session. When the victim's JWT expires, the frontend refreshes into the attacker's identity.

## Details
- `pkg/routes/api/v2/huma.go:80-88` registers `application/x-www-form-urlencoded` API-wide (meant for `/oauth/token`), and Huma decodes by Content-Type, so a form body binds into the json-tagged `user.Login`. A form POST needs no CORS preflight. v1 is not affected: Echo's form binder maps only `form`-tagged struct fields, and `user.Login` / `openid.Callback` carry only `json`/`query` tags, so a v1 form POST binds nothing and fails before any cookie is set.
- `pkg/routes` has no CSRF, Origin or `Sec-Fetch` checks.
- `exchangeOidcTokens` (`pkg/modules/auth/openid/openid.go:614-627`) trusts `code` and `redirect_url` from the body, with no server-side state. The OIDC `state` is checked only in the frontend, which a direct form POST skips.
- The refresh that switches identity is at `frontend/src/stores/auth.ts:453-462`.
- Authenticated routes are not affected: the bearer token is in localStorage. Refresh is not affected: the Lax cookie isn't sent on a cross-site POST.

Related: GHSA-pq54-9g68-cxjr (closed) reported the missing OIDC `state`/`nonce` with a JSON PoC, which a browser can't send cross-site without a preflight. Form-encoded bodies are the remaining gap that makes the unbound callback, and the password login, reachable from a plain cross-site form.

## Impact
The victim unknowingly works in the attacker's account, so tasks, notes and files they add are readable by the attacker. Requires an attacker account and a victim visiting an attacker page; it takes effect at the next token refresh. Affects releases with the refresh cookie (v2.0.0 and later).

## Fix
Stop registering the form format API-wide. Add one middleware on both API groups that rejects form Content-Type with 415, except on `/oauth/token`. Optionally reject `Sec-Fetch-Site: cross-site` on session-issuing endpoints.

_Found via internal security review (deep #44, deep #11)._

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
code.vikunja.io/api≥ 2.0.0 ≤ 2.7.0
v0.24.6
2.0.0
2.7.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gocode.vikunja.io/api
Sin parche — — v0.24.6 no afectada
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/go-vikunja/vikunja/security/advisories/GHSA-frf4-3prf-3vch

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