CVE-2026-54766: Vikunja: Project duplication bypasses write-permission check on the target parent project

Published Aug 28, 2026
·
Updated

Summary

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/projectduplicate.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:

go 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:

1. Wrong permission method. It calls parent.CanCreate ("may I create this project?") instead of parent.CanWrite ("may I create children inside this project?"). The latter is what the normal create path uses — POST /projects with a parentprojectid enforces parent.CanWrite via Project.CanCreate (pkg/models/projectpermissions.go:196-199).

2. Unhydrated struct. parent is constructed as &Project{ID: pd.ParentProjectID} and never loaded from the database, so its in-memory ParentProjectID is always 0. Inside Project.CanCreate the only branch that performs any permission check is if p.ParentProjectID != 0 { return parent.CanWrite(...) } — which therefore never executes. Control falls through to the link-share check and then return true, nil. The result is true for any authenticated non-link-share user, for any ParentProjectID.

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.

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.

Proof of Concept

1. As user A, create or have read access to any project S (e.g. id 100). 2. Identify a parent project P (e.g. id 5) owned by user B, to which A has no access. 3. Call PUT /api/v1/projects/100/duplicate with body {"parentprojectid": 5}. 4. 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/projects with parentprojectid: 5 would 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.

Recommended Fix

In ProjectDuplicate.CanCreate, check write access to the parent directly:

go 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.)

Other sources

Vikunja is an open-source self-hosted task management platform. From 0.21.0 until 2.4.0, the project duplication operation in pkg/models/projectduplicate.go allows an authenticated user who can read a source project to place its duplicate beneath an arbitrary target parent project. ProjectDuplicate.CanCreate calls parent.CanCreate on an unhydrated Project containing only the body supplied parentprojectid instead of calling parent.CanWrite, so the target parent write-permission check is skipped. The ordinary project creation path enforces that permission, but PUT /api/v1/projects/{project}/duplicate does not, allowing attacker-owned content to be injected into another user or team project hierarchy. This issue is fixed in version 2.4.0.

MITRE

Affected Software

1 affected componentFixes available
go/code.vikunja.io/api>=0.21.0<=2.3.0
2.4.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/code.vikunja.io/api to a version that resolves this vulnerability.

    Fixed in 2.4.0
  2. Upgrade

    Upgrade Vikunja to a version that resolves this vulnerability.

    Fixed in 2.4.0

Event History

Aug 28, 2026
CVE Published
via MITRE·04:36 PM
Data Sourced
via MITRE·04:36 PM
DescriptionWeakness
Advisory Published
via GitHub·04:37 PM
Data Sourced
via GitHub·04:37 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Is duplication without a target parent subject to the same parent-permission check?

No. When ParentProjectID is 0, the authorization function returns based on read access to the source project and does not perform a parent-project check.

2

Can defenders rely on this authorization path to confirm that the selected parent exists and is writable by the requester?

No. The implementation does not correctly enforce the intended checks that the parent project exists and that the requester has write access to it.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203