GHSA-H4Q3-MC9R-Q7VV
TOTP can be enrolled and enabled without the password, letting a stolen session lock the owner out
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-H4Q3-MC9R-Q7VV divulgada · CVSS 5.9 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A missing step-up check lets a short-lived stolen session lock the owner out of their account:
TOTP enrolment and activation need no password. Whoever holds a session can enable TOTP with a secret only they know. A password reset does not clear TOTP, and there is no admin or CLI way to remove it. This is a lockout, not a takeover: enabling TOTP kills all sessions, the attacker's included, and the attacker still doesn't know the password.
The unthrottled password re-check endpoints from the original report are tracked in GHSA-49pj-52x6-8gpj.
Confirmed on v2.7.0 and `main` @ e7d7f173e.
Credit: Takaya Sato (@dagadjno).
Details
TOTP without step-up: `UserTOTPEnroll` (`pkg/routes/api/v1/user_totp.go:64`) and `UserTOTPEnable` (`:99`) only require a session. Enabling also calls `DeleteAllUserSessions` (`:125`), which logs out the real owner and the attacker alike. The v2 routes behave the same (`pkg/routes/api/v2/user_totp.go:187,206`; sessions deleted at `:210`). `DisableTOTP` is only reachable through the self-service route, so a locked-out user cannot use it, and `pkg/cmd` has no TOTP command.
Unthrottled password oracle: tracked separately in GHSA-49pj-52x6-8gpj.
Proof of concept
Default `vikunja/vikunja:2.7.0` configuration. `$S` is a session token for the victim's account (in a real attack: stolen, or obtained via the OAuth issue reported separately: GHSA-2jgx-846q-5gqf).
Lockout:
API=http://VIKUNJA/api/v1
# 1. Optional persistence: create an API token (API tokens are not sessions and survive step 3)
curl -s -X PUT $API/tokens -H "Authorization: Bearer $S" -H 'Content-Type: application/json' \
-d '{"title":"x","permissions":{"projects":["read_all","create"]},"expires_at":"2030-01-01T00:00:00Z"}'
# 2. Enroll TOTP, no password asked -> 200 {"secret":"...","url":"otpauth://..."}
curl -s -X POST $API/user/settings/totp/enroll -H "Authorization: Bearer $S"
# 3. Enable it with a code generated from that secret (e.g. oathtool --totp -b <secret>) -> 200, all sessions deleted
curl -s -X POST $API/user/settings/totp/enable -H "Authorization: Bearer $S" -H 'Content-Type: application/json' -d '{"passcode":"<code>"}'Result: the owner's login with the correct password returns `412 {"code":1017,"message":"Invalid totp passcode."}`. Step 3 also deletes the attacker's session `$S`; the attacker can't log in either, since they don't know the password. After a full password reset by email, login with the new password still returns 412. The API token from step 1 keeps working (`GET /user` 200, `PUT /projects` 201). That token isn't granted by this bug: any stolen session can mint one (see GHSA-4qvp-948j-4cgv).
Oracle: see GHSA-49pj-52x6-8gpj.
Observed in a test instance (2026-10-07). The end-to-end chain was run with a session obtained through the OAuth issue: TOTP enabled, owner locked out even after a password reset, attacker's API token still valid.
The owner's existing access token keeps working until it expires (up to 10 minutes). A user who notices in time can still disable TOTP. After that, only a direct database edit by the operator restores access.
Impact
Missing step-up authentication (CWE-306). It affects every user on default settings.
Anyone who briefly holds a user's session (an unattended browser, a leaked token, or the OAuth issue reported separately: GHSA-2jgx-846q-5gqf) can:
- Lock the owner out: enable TOTP with their own secret. Password reset doesn't help, the owner can no longer revoke the attacker's API tokens, and recovery needs a direct database edit by the operator.
This alone does not give the attacker the account: enabling TOTP ends their session too. Persistent attacker access needs a separately minted credential such as an API token.
Fix
Require the current password on TOTP enroll and enable. A TOTP code can't gate this: there's no existing factor, and the enable passcode comes from the new secret. Run the password check through the per-user failed-attempt limiter from GHSA-49pj-52x6-8gpj. An admin CLI command to reset a user's TOTP would also give operators a recovery path.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
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-h4q3-mc9r-q7vvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
