The DELETE /api/v1/projects/:project/background endpoint checks CanRead permission instead of CanUpdate, allowing any user with read-only access to a project to permanently delete its background image.
The RemoveProjectBackground handler (pkg/modules/background/handler/background.go) reuses checkProjectBackgroundRights, a helper originally written for the read-only GetProjectBackground endpoint. This helper only verifies CanRead permission. In contrast, the handler for setting a background (setBackgroundPreparations) correctly checks CanUpdate.
As a result, destructive write operations (deleting the background file from storage and clearing the project's background_file_id and background_blur_hash fields) are gated behind a read-only permission check.
A user with read-only access to a project — via direct sharing, team membership, link share tokens with read permission, or read-scoped API tokens — can permanently delete the project's background image. The background file is removed from storage and cannot be recovered. This constitutes unauthorized data destruction.
DELETE /api/v1/projects/{project_id}/background with a valid auth token.pkg/modules/background/handler/background.go — RemoveProjectBackground (line 416), checkProjectBackgroundRights (line 304), setBackgroundPreparations (line 106)pkg/routes/routes.go line 665 — route registrationThis vulnerability was found using GitHub Security Lab Taskflows.
{
"cwe_ids": [
"CWE-863"
],
"github_reviewed_at": "2026-03-20T17:25:21Z",
"nvd_published_at": "2026-03-20T15:16:18Z",
"severity": "MODERATE",
"github_reviewed": true
}