Vikunja Improper Authorization via ProjectView Deletion
An improper authorization vulnerability in Vikunja allows authenticated users to destroy task organization data in other projects by supplying a target view ID within a crafted API request.
Vikunja contains an authorization bypass vulnerability (CWE-639) within the ProjectView.Delete method, which fails to properly validate that a requested view ID belongs to the project ID specified in the API path. Although the initial permission check correctly verifies that the user is an administrator of the provided project, the subsequent cascading delete operations on the task_buckets and task_positions tables are performed using only the view ID. Because the application does not verify the relationship between the project and the view during these cascading operations, an authenticated attacker can supply their own project ID while targeting a view ID belonging to a victim project. This results in the silent destruction of all Kanban bucket assignments and task orderings for the victim view, with no programmatic recovery path other than restoring from backups. The issue originates in pkg/models/project_view.go and affects all versions prior to the patch.
Attack Chain
- Attacker registers a local account on the target Vikunja instance (no special privileges required).
- Attacker creates a new project via
PUT /api/v1/projects, granting themselves Admin access to the new project ID (P_A). - Attacker identifies a victim Kanban view ID (
V) by enumerating projects or observing API traffic. - Attacker constructs a malicious
DELETErequest:DELETE /api/v1/projects/P_A/views/V. - The application's
CanDeletemethod validates the user is an admin ofP_Aand permits the request. - The
ProjectView.Deletemethod executes the first scoped SQL statement, which fails silently becauseVdoes not belong toP_A. - The function proceeds to execute subsequent unscoped SQL
DELETEstatements on thetask_bucketsandtask_positionstables usingV. - All Kanban organization data for the victim view
Vis permanently deleted from the database.
Impact
Successful exploitation results in the permanent loss of all task-to-bucket mappings and custom task ordering for the targeted Kanban view. This causes significant operational disruption for teams relying on Kanban boards, requiring manual reconfiguration or restoration from database backups. The vulnerability is highly accessible as it requires only standard user registration.
Recommendation
- Upgrade Vikunja immediately to the version containing the security patch that enforces project-view relationship validation within the
ProjectView.Deletemodel method. - Implement strict input validation to verify that
view_idmaps to theproject_idprovided in the API request before any database modification occurs. - Ensure database backups are performed regularly and tested for restoration to mitigate the impact of data destruction vulnerabilities.
- Review audit logs for
DELETEoperations on theproject_viewsendpoint that target views not associated with the authenticated user's project ownership.
Immediate actions
Upgrade Vikunja to the patched version.
Threat Hunt
Search web server access logs for DELETE requests to /projects/*/views/* where the project ID does not match the user context.
Data: webserver access logs
Mitigations
Upgrade to patched Vikunja version.
CWE-639