GHSA-564f-wx8x-878h

Suggest an improvement
Source
https://github.com/advisories/GHSA-564f-wx8x-878h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-564f-wx8x-878h/GHSA-564f-wx8x-878h.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-564f-wx8x-878h
Aliases
Published
2026-03-20T17:25:21Z
Modified
2026-03-23T18:56:15.961357Z
Severity
  • 5.3 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N CVSS Calculator
Summary
Vikunja read-only users can delete project background images via broken object-level authorization
Details

Summary

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.

Details

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.

Impact

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.

Reproduction

  1. User A creates a project and sets a background image.
  2. User A shares the project with User B with read-only permission.
  3. User B sends: DELETE /api/v1/projects/{project_id}/background with a valid auth token.
  4. The request succeeds. The background image is permanently deleted.

References

  • pkg/modules/background/handler/background.goRemoveProjectBackground (line 416), checkProjectBackgroundRights (line 304), setBackgroundPreparations (line 106)
  • pkg/routes/routes.go line 665 — route registration

Credits

This vulnerability was found using GitHub Security Lab Taskflows.

Database specific
{
    "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
}
References

Affected packages

Go / code.vikunja.io/api

Package

Name
code.vikunja.io/api
View open source insights on deps.dev
Purl
pkg:golang/code.vikunja.io/api

Affected ranges

Type
SEMVER
Events
Introduced
0.20.2
Fixed
2.2.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-564f-wx8x-878h/GHSA-564f-wx8x-878h.json"