Summary
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.
Details
I verified this locally on commit c5450fb55f5192508638cbb3a6956438452a712e.
Relevant code paths:
pkg/models/api_routes.gopkg/routes/routes.gopkg/modules/background/handler/background.go
Route registration exposes separate permissions for the same path:
GET /api/v1/projects/:project/background->projects.backgroundDELETE /api/v1/projects/:project/background->projects.background_delete
At 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.
This matters because RemoveProjectBackground() is a real destructive operation:
- It checks project update rights.
- It deletes the background file if present.
- It clears the project's
BackgroundFileID.
PoC
- Log in as a user who can update a project that already has a background.
- Create an API token with only:
{"projects":["background"]} - Send:
DELETE /api/v1/projects/<project_id>/backgroundAuthorization: Bearer <token> - Observe that the request succeeds and the project background is removed.
For comparison:
- Create an API token with only:
{"projects":["background_delete"]} - Repeat the same DELETE request.
- Observe that the request is rejected with
401 Unauthorized.
I confirmed this locally with three validations:
/api/v1/routesadvertises bothbackgroundandbackground_delete.- The matcher unit test proves
CanDoAPIRoute()accepts DELETE forbackground. - The webtest proves a real API token with only
backgroundsuccessfully deletes the background.
Impact
Scoped 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.
The 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.
The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions. Typical impact: unauthorized data access or execution of privileged operations.
CVE-2026-40103 has a CVSS score of 5.4 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.3.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-40103? CVE-2026-40103 is a medium-severity incorrect authorization vulnerability in code.vikunja.io/api (go), affecting versions < 2.3.0. It is fixed in 2.3.0. The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions.
- How severe is CVE-2026-40103? CVE-2026-40103 has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of code.vikunja.io/api are affected by CVE-2026-40103? code.vikunja.io/api (go) versions < 2.3.0 is affected.
- Is there a fix for CVE-2026-40103? Yes. CVE-2026-40103 is fixed in 2.3.0. Upgrade to this version or later.
- Is CVE-2026-40103 exploitable, and should I be worried? Whether CVE-2026-40103 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-40103 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-40103? Upgrade
code.vikunja.io/apito 2.3.0 or later.