Summary
Vikunja contains an authorization flaw where disabled or locked user accounts are only enforced on local login and JWT refresh, but not on API tokens, CalDAV basic auth, or OpenID Connect authentication paths.
As a result, users whose accounts are intended to be blocked can still authenticate through these alternative mechanisms, continue accessing the API, and synchronize data as long as they hold valid credentials or tokens.
Affected context
This vulnerability affects Vikunja deployments that:
- Rely on the built-in account lock or disable mechanism to revoke user access, and
- Allow one or more of the following authentication methods:
- API token authentication
- CalDAV basic authentication
- OpenID Connect (OIDC) authentication
The issue appears when user status (enabled/disabled/locked) is checked only in some authentication flows (local login and JWT refresh) while other entry points do not consistently enforce the same status check.
Exploit preconditions
- Attack surface: Vikunja HTTP API endpoints (including CalDAV) and OIDC-backed login flows.
- Required access:
- A Vikunja account that has been disabled or locked, and
- Existing valid API tokens, stored CalDAV credentials, or access to an IdP that can still authenticate the user via OIDC.
- Trigger point:
- Using API tokens to call Vikunja endpoints,
- Using CalDAV clients with saved basic auth credentials, or
- Logging in via OpenID Connect.
- Why exploitation is possible:
- The authorization logic to verify user status is implemented only for local username/password login and JWT refresh paths.
- Other authentication mechanisms accept credentials or tokens without re-checking whether the associated user account has been disabled or locked, resulting in inconsistent access control enforcement across authentication paths.
Why this happens
The root cause is inconsistent authorization checks across multiple authentication mechanisms, aligning with CWE-285 (Improper Authorization) and CWE-863 (Incorrect Authorization).
While the application correctly enforces account status on local login and JWT refresh, it fails to centralize and reuse the same status verification logic for API token authentication, CalDAV basic auth, and OpenID Connect flows.
This split logic leads to a situation where user identity is successfully confirmed, but the subsequent authorization decision (whether the account should be allowed to act) is either missing or incomplete on some code paths.
Potential impact
- Disabled or locked users may continue to access Vikunja APIs via existing API tokens.
- Users with revoked access can keep syncing tasks and calendars over CalDAV.
- Users whose accounts should be blocked may still log in using OpenID Connect, depending on IdP configuration.
- Administrative expectations about account revocation may be violated, weakening incident response and offboarding processes.
- Compliance and audit assumptions about user deprovisioning and least privilege may no longer hold true.
General mitigation guidance
Mitigation generally focuses on centralizing authorization decisions and enforcing consistent account status checks across all authentication mechanisms.
Pattern-based mitigations include:
- Implementing a single, shared authorization layer that:
- Resolves the authenticated principal, and
- Verifies account status (enabled/disabled/locked) before granting access to any API endpoint, regardless of how the user authenticated.
- Treating account status as a mandatory gate that runs after authentication but before application-level authorization (role/permission checks).
- Designing token and credential validation routines (for API tokens, CalDAV basic auth, and OIDC sessions) to always reference server-side user state, rather than assuming that valid credentials imply allowed access.
- Applying defense-in-depth by:
- Reducing long-lived tokens or credentials where feasible.
- Separating authentication from authorization logic and avoiding per-endpoint ad-hoc checks.
- Establishing clear offboarding and account revocation workflows that invalidate or re-check any active tokens and external identity sessions against current user status.
How teams detect issues like this
Detection approaches can focus on both code and runtime behavior:
- Static/code-level detection:
- Review authentication middleware and handlers to ensure:
- A common authorization step checks account status for every request linked to a user context.
- API token verification, CalDAV basic auth, and OIDC login flows call the same central authorization logic as local login.
- Use static analysis or linters to flag:
- Direct use of user identifiers or tokens to grant access without a follow-up status check.
- Multiple, duplicated authentication flows that implement their own user lookup logic.
- Configuration and policy review:
- Verify that architectural and coding standards require:
- Post-authentication enforcement of user status.
- A single source of truth for account enable/disable decisions.
- Runtime and log-based detection:
- Monitor logs for access attempts by accounts marked as disabled or locked.
- Alert on any successful API calls, CalDAV syncs, or OIDC-based sessions associated with disabled or locked accounts.
Automated code review tools or CI guardrails can help flag newly introduced authentication paths that skip centralized authorization or user status validation.

