{"id":"CVE-2026-40103","aliases":["CVE-2026-40103","GHSA-v479-vf79-mg83","GO-2026-5650"],"related":[],"kind":"vulnerability","state":"published","title":"Vikunja's Scoped API tokens with projects.background permission can delete project backgrounds","summary":"Vikunja is an open-source self-hosted task management platform. Prior to 2.3.0, Vikunja's scoped API token enforcement for custom project background routes is method-confused. A token with only projects.background can successfully delete a project background, while a token with only projects.background_delete is rejected. This is a scoped-token authorization bypass. This vulnerability is fixed in 2.3.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vikunja is an open-source self-hosted task management platform. Prior to 2.3.0, Vikunja's scoped API token enforcement for custom project background routes is method-confused. A token with only projects.background can successfully delete a project background, while a token with only projects.background_delete is rejected. This is a scoped-token authorization bypass. This vulnerability is fixed in 2.3.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nVikunja's scoped API token enforcement for custom project background routes is method-confused. A token with only `projects.background` can successfully delete a project background, while a token with only `projects.background_delete` is rejected.\n\nThis is a scoped-token authorization bypass.\n\n### Details\n\nI verified this locally on commit `c5450fb55f5192508638cbb3a6956438452a712e`.\n\nRelevant code paths:\n* `pkg/models/api_routes.go`\n* `pkg/routes/routes.go`\n* `pkg/modules/background/handler/background.go`\n\nRoute registration exposes separate permissions for the same path:\n* `GET /api/v1/projects/:project/background` -> `projects.background`\n* `DELETE /api/v1/projects/:project/background` -> `projects.background_delete`\n\nAt enforcement time, `CanDoAPIRoute()` falls back to the parent group and reconstructs the child permission from the path segments only. For the DELETE request, that becomes `background`, so the matcher accepts any token containing `projects.background` without re-checking the HTTP method or matching the stored route detail.\n\nThis matters because `RemoveProjectBackground()` is a real destructive operation:\n* It checks project update rights.\n* It deletes the background file if present.\n* It clears the project's `BackgroundFileID`.\n\n### PoC\n\n1. Log in as a user who can update a project that already has a background.\n2. Create an API token with only:\n   `{\"projects\":[\"background\"]}`\n3. Send:\n   `DELETE /api/v1/projects/<project_id>/background`\n   `Authorization: Bearer <token>`\n4. Observe that the request succeeds and the project background is removed.\n\n**For comparison:**\n1. Create an API token with only:\n   `{\"projects\":[\"background_delete\"]}`\n2. Repeat the same DELETE request.\n3. Observe that the request is rejected with `401 Unauthorized`.\n\nI confirmed this locally with three validations:\n1. `/api/v1/routes` advertises both `background` and `background_delete`.\n2. The matcher unit test proves `CanDoAPIRoute()` accepts DELETE for `background`.\n3. The webtest proves a real API token with only `background` successfully deletes the background.\n\n### Impact\n\nScoped API tokens can exceed their intended capability. A token intended for project background access can delete project backgrounds, which weakens the trust model for automation and third-party integrations that rely on narrowly scoped tokens.\n\nThe attacker needs a valid API token created by a user who has update rights on the target project, but the token itself only needs the weaker `projects.background` permission.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Vikunja: Scoped API tokens with projects.background permission can delete project backgrounds in code.vikunja.io/api.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: code.vikunja.io/api before v2.3.0.","format":"markdown","source":"go"},{"lang":"es","text":"Vikunja es una plataforma de gestión de tareas de código abierto autoalojada. Antes de la versión 2.3.0, la aplicación de tokens de API con ámbito de Vikunja para rutas de fondo de proyecto personalizadas presenta confusión de métodos. Un token con solo projects.background puede eliminar con éxito un fondo de proyecto, mientras que un token con solo projects.background_delete es rechazado. Esto es una omisión de autorización de token con ámbito. Esta vulnerabilidad está corregida en la versión 2.3.0.","source":"nvd"}],"published":"2026-04-10T15:36:47.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-836","CWE-863"],"affected":[{"ranges":[{"version":"< 2.3.0","status":"affected"}],"vendor":"go-vikunja","product":"vikunja","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.3.0"}],"ecosystem":"Go","package":"code.vikunja.io/api","purl":"pkg:golang/code.vikunja.io/api","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"code.vikunja.io/api","purl":"pkg:golang/code.vikunja.io/api","source":"go"},{"ranges":[{"status":"affected","fixed":"2.3.0"}],"vendor":"vikunja","product":"vikunja","cpe":"cpe:2.3:a:vikunja:vikunja:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/go-vikunja/vikunja/security/advisories/GHSA-v479-vf79-mg83","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/go-vikunja/vikunja/pull/2584","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/go-vikunja/vikunja/commit/6a0f39b252a81fa4b19dc56dc889183acc9225ae","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/go-vikunja/vikunja/releases/tag/v2.3.0","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40103","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/go-vikunja/vikunja","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-15T14:45:05.880Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40103","url":"https://www.cve.org/CVERecord?id=CVE-2026-40103","licence":"CVE Terms of Use","modified":"2026-04-15T14:45:18.303Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v479-vf79-mg83","url":"https://github.com/advisories/GHSA-v479-vf79-mg83","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:19.763Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5650","url":"https://pkg.go.dev/vuln/GO-2026-5650","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:37.356Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40103","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40103","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:18.527Z","epss":{"score":0.0037,"percentile":0.22977,"date":"2026-11-30T12:00:22.000Z"}}