Summary
Vikunja has a privilege escalation flaw in account deletion handling that can let a team owner gain administrative control or ownership of a read-only shared project. The risk arises when deleting an account triggers project permission handling that promotes a read-only share.
Affected context
The issue is reported in Vikunja versions from 0.18.0 before 2.7.1. It involves the bots endpoint and the ensureProjectAdminUser behavior invoked during account deletion. When a deleted account is associated with shared projects, permission handling may promote a read-only share, potentially displacing the project's real owner.
Exploit preconditions
- Attack surface: Account deletion through Vikunja's bots endpoint
- Required access: Team-owner-level access to create and manage a bot in the team
- Trigger point: Deletion of the bot account
- Why exploitation is possible: The deletion flow can promote a read-only project share to an administrative or ownership role
Why this happens
The account deletion flow can change project privileges in a way that grants more authority than intended. This is a privilege-management weakness mapped to CWE-269: Improper Privilege Management: cleanup behavior does not preserve the intended boundary between read-only sharing and project administration or ownership.
Potential impact
- A team owner could gain administrative control or ownership of a shared project
- The legitimate project owner could lose access or be locked out
- Project settings or content could be changed without the owner's authorization
- Trust in project ownership and access controls could be undermined
General mitigation guidance
Defensive approaches focus on keeping account cleanup separate from privilege elevation and preserving explicit ownership boundaries.
- Ensure deletion workflows do not grant broader project permissions as a side effect.
- Use explicit, authorized rules for transferring project ownership.
- Treat permission changes as sensitive operations and validate the actor's authority and the target project's state.
- Apply least privilege to team roles and account-management capabilities.
- Record and review ownership and permission changes, especially those triggered by automated cleanup.
How teams detect issues like this
- Review account-deletion and bot-management code for permission changes to related projects.
- Use static analysis and code review checks to flag cleanup paths that assign roles or ownership.
- Test deletion workflows with read-only shares and verify that project owners and permissions remain unchanged unless an authorized transfer is requested.
- Monitor audit records for unexpected ownership changes or privilege increases following account deletion.
- Enforce policies requiring explicit authorization and auditability for project ownership transfers.

