/

CVE-2026-34727

Severity:

HIGH RISK

(7.4)

Improper Authentication in Vikunja OIDC Callback Skipping

CVE-2026-34727

Analyzed

Vulnerability type

Category:

Improper Authentication

CWE:

CWE-287

Impact:

Bypass of Two-Factor Authentication and Account Protection Controls

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Vikunja's OIDC callback handler can issue a full authenticated session token without enforcing TOTP two-factor authentication for local users who have TOTP enabled.

When a local account with TOTP enrolled is matched via the OIDC email fallback mechanism, the second factor step is silently bypassed, allowing attackers who satisfy only the first factor to gain full access.

Affected context

This vulnerability affects Vikunja instances configured to:

  • Use OpenID Connect (OIDC) for authentication
  • Rely on email-based fallback matching between OIDC identities and local users
  • Have users who enabled TOTP-based two-factor authentication on their local accounts

In such deployments, the OIDC callback handler may treat a successful OIDC login as sufficient for issuing a full JWT session for a TOTP-enrolled local user, without prompting for or validating the second factor.

Exploit preconditions

  • Attack surface: Vikunja web application's OIDC login flow, reachable over the network.
  • Required access: Ability to authenticate to the configured OIDC provider as, or in a way that is mapped to, a local Vikunja user account that has TOTP enabled.
  • Trigger point: Completion of the OIDC login and callback flow where the email-based local user fallback logic is applied.
  • Why exploitation is possible: The OIDC callback logic issues a full JWT token based solely on the OIDC assertion and email match, without re-checking the local account's TOTP requirement or enforcing a second-factor step.

Why this happens

The core issue is improper authentication flow design and enforcement, aligning with CWE-287: Improper Authentication.

The authentication pipeline implicitly assumes that a successful OIDC login is equivalent to full completion of all local authentication requirements, including TOTP.

As a result, the code path that handles email-based matching between an OIDC identity and a local Vikunja user does not consult or respect the local user's TOTP configuration before issuing a fully privileged JWT.

This reflects a broader pattern where federated login assertions are trusted without correctly integrating or re-evaluating local multi-factor policies.

Potential impact

  • Attackers who can control or compromise an OIDC identity mapped by email to a TOTP-protected Vikunja account can bypass TOTP.
  • Local accounts that rely on TOTP for extra security can be accessed with only the OIDC provider's first-factor authentication.
  • Sensitive data within Vikunja, such as tasks, projects, and shared workspaces, can be read or modified.
  • Integrity of team collaboration workflows can be impacted if an attacker assumes the identity of a TOTP-enrolled user.
  • Security expectations for multi-factor protection may be undermined, reducing trust in the deployment's access controls.

General mitigation guidance

Effective mitigation focuses on correctly integrating federated authentication with local multi-factor policies:

  • Treat OIDC login as a contributor to identity proofing, not as an automatic bypass of locally configured factors such as TOTP.
  • Ensure that after mapping an OIDC identity to a local user, the authentication flow checks whether the local account requires additional factors and enforces them before issuing a full session token.
  • Separate identity federation logic (who is this user?) from authorization and policy enforcement (what factors are required for this account?).
  • Implement a clear, centralized decision point for evaluating MFA/TOTP requirements so that all login paths, including OIDC callbacks and email-based fallbacks, follow the same policy.
  • Use least-privilege session issuance patterns, such as initially creating a "partially authenticated" session that only becomes fully privileged after required second factors are satisfied.

How teams detect issues like this

Detection efforts can focus on both code-level and runtime indicators:

  • Static analysis and code review:
  • Look for OIDC or SSO callback handlers that directly create or sign JWTs/sessions without consulting MFA/TOTP state.
  • Identify authentication flows where local security settings (e.g., 2FA flags) are not checked uniformly across all login paths.
  • Review any email-based fallback or account-linking logic for skipped policy checks.
  • Policy and configuration review:
  • Verify that documented MFA policies are actually enforced in all configured authentication providers and flows.
  • Runtime monitoring and logging:
  • Log when a TOTP-enrolled account authenticates via OIDC and confirm whether a TOTP challenge is presented.
  • Alert on high-risk events where a TOTP-enabled account logs in via federated identity without a corresponding second-factor verification event.
  • Automated security testing tools or CI checks can be configured to flag authentication endpoints that issue tokens without confirming required factors.

Sources

SourceLink
github.comgithub.com/go-vikunja/vikunja/security/advisories/GHSA-8jvc-mcx6-r4cg

Frequently asked

questions

Yes. An attacker who can access the Vikunja web interface and authenticate to the configured OIDC provider in a way that maps to a TOTP-enabled local account can exploit this issue over the network.

The attacker needs the ability to authenticate at the OIDC provider as, or as an identity that is matched by email to, a Vikunja local user with TOTP enabled. They do not need direct access to the victim's TOTP secrets because the second factor is not enforced in this path.

The safest pattern is to centralize authentication policy enforcement so that after mapping an OIDC identity to a local user, the system always checks whether that user requires TOTP (or any MFA) and performs the necessary challenge before issuing a fully privileged JWT or session.

Design authentication flows so that federated identity assertions and local MFA policies are integrated rather than treated independently. Use a single, consistent decision layer that:

  • Evaluates all required factors for a local account regardless of login method,
  • Avoids special-case email-based fallbacks that bypass security checks,
  • Is covered by tests that simulate all supported login paths, including SSO and local login, to ensure MFA is always enforced where configured.
Find out what's already
exploitable in your codebase.