Summary
Vikunja can incorrectly link an OIDC identity to an attacker-controlled local account when email fallback is enabled and that account uses the victim's unverified email address. When the victim logs in with OIDC for the first time, the link may give them access to the existing account and its data.
Affected context
The issue affects Vikunja deployments where email fallback is enabled and local accounts can be created or edited with email addresses that have not been verified. Risk arises when OIDC account linking treats a matching email as sufficient to associate a first-time SSO identity with an existing local account.
Exploit preconditions
- Attack surface: Local account registration or profile editing, followed by OIDC login and account linking
- Required access: The ability to register or edit a local account and set its email to the victim's address
- Trigger point: The victim's first OIDC login when email fallback is enabled
- Why exploitation is possible: The account-linking flow may rely on an unverified email match rather than confirmed ownership of the address
Why this happens
The underlying issue is an authentication and identity-linking trust failure, associated with CWE-287: Improper Authentication. An unverified email address is treated as proof that a local account and an OIDC identity belong to the same person. Linking identities based on this unconfirmed attribute can associate a victim's login with an account controlled by someone else.
Potential impact
- An attacker could cause a victim's SSO identity to be linked to an attacker-controlled account.
- The victim may gain access to data or resources stored in that account.
- Account ownership and audit records may become unreliable.
- An attacker may retain access to account data or settings, depending on the application's account and session behavior.
General mitigation guidance
Defensive patterns focus on verifying identity attributes and making account linking explicit:
- Require email ownership verification before using an address to associate accounts.
- Link identities using a stable, validated provider identifier rather than an unverified email match.
- Require an authenticated confirmation step before linking an SSO identity to an existing local account.
- Keep email fallback disabled by default where it is not necessary, and clearly constrain when it can be used.
- Apply least privilege to accounts and limit the data available until identity ownership is established.
How teams detect issues like this
Review authentication and account-linking logic for automatic associations based solely on email addresses, especially when email verification status is absent or ignored. Examine registration and profile-editing flows to confirm that email changes require verification, and check policies for whether email fallback is enabled. Monitor for first-time SSO logins linked to pre-existing local accounts and for account changes involving unverified email addresses. Static analysis and automated review tools may help identify trust decisions that use unverified identity attributes.

