Summary
Vikunja has a project duplication bypasses write-permission check on the target parent project
The project-duplication endpoint fails to enforce write access to the target parent project. Any authenticated (non-link-share) user can duplicate a project they can read into any parent project on the instance, regardless of whether they have write access to that parent, injecting an attacker-owned project into another user's or team's project hierarchy.
Details
ProjectDuplicate.CanCreate (pkg/models/project_duplicate.go) is meant to require write access to the parent the duplicate is placed under, its own comment says "Parent project exists + user has write access". The implementation does neither correctly:
func (pd *ProjectDuplicate) CanCreate(s *xorm.Session, a web.Auth) (canCreate bool, err error) {
pd.Project = &Project{ID: pd.ProjectID}
canRead, _, err := pd.Project.CanRead(s, a)
if err != nil || !canRead {
return canRead, err
}
if pd.ParentProjectID == 0 {
return canRead, err
}
// Parent project exists + user has write access to is (-> can create new projects)
parent := &Project{ID: pd.ParentProjectID}
return parent.CanCreate(s, a) // <-- bug
}
Two defects compound here:
Wrong permission method. It calls
parent.CanCreate("may I create this project?") instead ofparent.CanWrite("may I create children inside this project?"). The latter is what the normal create path uses,POST /projectswith aparent_project_idenforcesparent.CanWriteviaProject.CanCreate(pkg/models/project_permissions.go:196-199).Unhydrated struct.
parentis constructed as&Project{ID: pd.ParentProjectID}and never loaded from the database, so its in-memoryParentProjectIDis always0. InsideProject.CanCreatethe only branch that performs any permission check isif p.ParentProjectID != 0 { return parent.CanWrite(...) }, which therefore never executes. Control falls through to the link-share check and thenreturn true, nil. The result istruefor any authenticated non-link-share user, for anyParentProjectID.
Nothing downstream re-checks: ProjectDuplicate.Create → CreateProject → checkProjectBeforeUpdateOrDelete (pkg/models/project.go:954) validates only that the parent exists, is not a pseudo-project, and introduces no cycle, no authorization.
Proof of Concept
- As user A, create or have read access to any project
S(e.g. id 100). - Identify a parent project
P(e.g. id 5) owned by user B, to which A has no access. - Call
PUT /api/v1/projects/100/duplicatewith body{"parent_project_id": 5}. - The request succeeds (201). A new project owned by A is created as a child of B's project 5, despite A having no write access to it. The equivalent
POST /api/v1/projectswithparent_project_id: 5would be correctly rejected with 403.
Affected versions
Introduced with the namespace→project migration (commit fef253312, first released in v0.21.0) and present through the latest release (v2.3.0). The shared model also backs the new /api/v2 duplication route under review, so any v2 release would inherit the same flaw unless fixed in the model.
Impact
An authenticated user can:
- Duplicate any project they can read (including their own) and attach the copy as a child of any parent project ID on the instance, with no write access to that parent.
- Inject an attacker-owned project into other users'/teams' project trees. The duplicate is owned by the attacker but appears inside the victim's hierarchy; members of the victim parent see it, and because Vikunja propagates parent access down the tree, they may inherit access to the injected project, enabling content injection / spam / phishing inside another tenant's workspace.
This is a bypass of the same parent-write guard that the ordinary create path enforces, so the duplicate route is an authorization hole for an operation that is otherwise correctly gated. The endpoint requires authentication; it does not expose or modify the victim's existing project data (the source is attacker-readable), so the impact is an integrity / access-control violation rather than confidentiality.
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.
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.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
In ProjectDuplicate.CanCreate, check write access to the parent directly:
parent := &Project{ID: pd.ParentProjectID}
return parent.CanWrite(s, a)
Project.CanWrite loads the project from the database and evaluates real permissions, fixing both the wrong-method and the unhydrated-struct defects at once and matching the documented contract. (It also rejects archived parents, which is desirable.)
Frequently Asked Questions
- What is CVE-2026-54766? CVE-2026-54766 is a medium-severity incorrect authorization vulnerability in code.vikunja.io/api (go), affecting versions >= 0.21.0, <= 2.3.0. It is fixed in 2.4.0. The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions.
- Which versions of code.vikunja.io/api are affected by CVE-2026-54766? code.vikunja.io/api (go) versions >= 0.21.0, <= 2.3.0 is affected.
- Is there a fix for CVE-2026-54766? Yes. CVE-2026-54766 is fixed in 2.4.0. Upgrade to this version or later.
- Is CVE-2026-54766 exploitable, and should I be worried? Whether CVE-2026-54766 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-54766 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-54766? Upgrade
code.vikunja.io/apito 2.4.0 or later.