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

GHSA-49PJ-52X6-8GPJ

No brute-force limit on password re-authentication; TOTP can be disabled with the password alone

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
5.9
Media
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/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:06 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-49PJ-52X6-8GPJ divulgada · CVSS 5.9 (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

The authenticated password re-check endpoints apply no rate limit and no lockout,
so a holder of a valid session (e.g. a stolen JWT) who does not know the account
password can guess it with unlimited, silent attempts. The sharpest sink is
`POST /user/settings/totp/disable` (v1 and v2), which removes 2FA on the **password
alone** (no current TOTP code) — so a successful guess also strips the second
factor. Account deletion and data export use the same bare check. Password change
and email change count failures and email the user, but never lock out, so they are
unlimited oracles too. Default configuration (`ratelimit.enabled` is `false` by default).

Details

The TOTP-disable handler checks only the password, via the bare
`user.CheckUserPassword` — a plain bcrypt compare with no failed-attempt counter
and no lockout:

// pkg/routes/api/v2/user_totp.go — totpDisable
if err := user.CheckUserPassword(u, in.Body.Password); err != nil { ... }   // :228
// pkg/routes/api/v1/user_totp.go — UserTOTPDisable
err = user.CheckUserPassword(u, login.Password)                              // :169
// pkg/user/user.go — CheckUserPassword (no counter, no lockout, no notification)
func CheckUserPassword(user *User, password string) error {                  // :500
    err := bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(password))
    ...
}

By contrast, wrong TOTP codes are protected: `HandleFailedTOTPAuth` locks the
account after 10 attempts. The dedicated brute-force protection exists for the
second factor, but not for the password re-check that can remove it:

// pkg/user/totp.go — HandleFailedTOTPAuth
if attempts < 10 { return }
...
if err := user.SetStatus(s, StatusAccountLocked); err != nil { ... }          // :276

No app-layer limiter stands in by default: `RateLimitEnabled.setDefault(false)`
(`pkg/config/config.go:473`); the always-on `noAuthRateLimit` covers only the
*unauthenticated* routes. Even enabled, the limiter is a per-key throughput cap,
not a failed-auth lockout. The existing `basicAuthRateLimit`
(`pkg/routes/rate_limit.go:137,153-188`) can't be reused as-is either: it is keyed by
IP and counts only 401s, while a wrong password here returns 403
(`pkg/user/error.go:225`).

The same unthrottled `CheckUserPassword` guards account deletion and data export
too: `user_deletion.go` (v1 `:70,:171`, v2 `:108,:157`), `user_export.go`
(v1 `:60`, v2 `:99`), `user_totp.go` (v1 `:169`, v2 `:228`). The login,
password-change, email-change and CalDAV paths instead use `CheckUserCredentials`,
which counts failures and emails the user at 3, but never locks the account
(`pkg/user/user.go:449`). So password change (`pkg/models/user_settings.go:76`) and
email change (`pkg/user/update_email.go:53`) are also unlimited guessing oracles for a
session holder; they are just not silent.

Proof of concept

Stock Docker image `vikunja/vikunja:unstable` (`v2.7.0-16-g58f7cf47`), SQLite,
default config. A victim registers, enables TOTP, and re-logs in with a TOTP code;
that session token is the one an attacker is assumed to hold (the attacker does not
know the password):

[setup] enable TOTP with a valid code        -> HTTP 200  (TOTP was enabled successfully.)
[setup] victim re-login with TOTP            -> HTTP 200
[setup] TOTP status before attack            -> enabled=True

With that session, 50 wrong-password guesses are sent to the disable endpoint:

POST /api/v1/user/settings/totp/disable      {"password":"123456"}
 -> HTTP 403  {"code": 1011, "message": "Wrong username or password."}
 ... (50 guesses) ...
[attack] 50 wrong guesses, status codes: {403: 50}  (429 seen: False)
[attack] after 50 failures: session valid (HTTP 200), TOTP enabled=True  => NOT locked, NOT throttled

No `429`, no lockout, the session stays valid and 2FA stays on. The winning guess
(the real password) then removes 2FA with no second factor:

POST /api/v1/user/settings/totp/disable      {"password":"<correct>"}
 -> HTTP 200  {"message": "TOTP was disabled successfully."}
[attack] TOTP status after attack            -> enabled=None  => 2FA REMOVED with password alone

bcrypt (default cost 11) is the only throttle; there is no attempt cap. The same
holds on `/api/v2/user/settings/totp/disable`.

Impact

Improper restriction of excessive authentication attempts (CWE-307). An attacker
who has obtained a victim's session but not their password can brute-force the
password with no limit and, on success, disable the victim's 2FA — turning a
transient session into full, persistent account takeover and defeating the second
factor. Deletion and export re-auth share the same unthrottled check; password change and
email change are throttled by nothing but a warning email. Requires an
authenticated session and a guessable password; default configuration (rate
limiting off).

Fix

  1. An always-on failed-attempt limiter, keyed by user, on TOTP disable/enable/enroll,
  2. Require a current TOTP code to disable TOTP, counted via `HandleFailedTOTPAuth`.

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:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
code.vikunja.io/api≤ 2.7.0
v0.24.6
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 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-49pj-52x6-8gpj

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