GHSA-5F6V-J6XM-WWJ9
Project-webhook token scope reaches user-level webhooks
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-5F6V-J6XM-WWJ9 divulgada · CVSS 5.4 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
An API token scoped only to project webhooks (`projects_webhooks`) can create, list, update and delete its owner's account-wide user webhooks, which token scopes deliberately exclude (`pkg/models/api_routes.go:266` skips `user_*` route groups). This stays within the token owner's account; it is not a cross-user escalation.
Details
- `Webhook.UserID`/`ProjectID` are JSON-bindable despite `readOnly`. v1 binds the body last; v2 is reached via path `project=0` plus a body `user_id` (`pkg/routes/api/v2/webhooks.go:115`), and `Create` validation passes (`pkg/models/webhooks.go:171-176`).
- `pkg/models/webhooks_permissions.go:72-74` then authorizes on `UserID == self`.
- Read: a v1 GET with a JSON body is bound (`BindBody` only checks `ContentLength`), so `ReadAll` lists user webhooks (`webhooks.go:232`).
- Update/delete: `canDoWebhook` swaps in the stored `UserID`/`ProjectID` (`webhooks_permissions.go:67-68`), and `Delete` deletes by id only (`webhooks.go:329`).
Impact
Medium. Needs a valid token with the `projects_webhooks` scope. Whoever holds such a narrowly scoped token (for example an integration that should only manage project webhooks) can register a user-level webhook to their own receiver and get the owner's user-directed events (reminders, overdue tasks) with task payloads from all of the owner's projects, and can read, change or delete the owner's existing user webhooks.
Fix
- Create and ReadAll: derive the resource class from the route alone. In v2 `webhooksCreate`, set `Body.UserID = 0`; on v1, force it in a route wrapper as `pkg/routes/api/v1/user_webhooks.go:100` does (the model can't tell where a value came from).
- Update/delete: check that the stored webhook is project-level and belongs to the URL's project. Zeroing the body does nothing here.
_Found via internal security review (03 #23, 03 #24, deep #20)._
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 no 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-5f6v-j6xm-wwj9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
