/

CVE-2026-111882

Severity:

HIGH RISK

(8.1)

Authentication Bypass (CWE-287) in phpMyFAQ SSO Callbacks

CVE-2026-111882

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Two-Factor Authentication Bypass and Account Takeover

Severity:

HIGH RISK

(8.1)

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

phpMyFAQ contains an authentication bypass in its Keycloak and Entra ID single sign-on callbacks that can allow an IdP-authenticated user to skip TOTP two-factor authentication. If an attacker controls or compromises an identity linked to a 2FA-enabled account, including an administrator account, the completed OIDC flow may provide a fully authenticated session.

phpMyFAQ contains an authentication bypass in its Keycloak and Entra ID single sign-on callbacks that can allow an IdP-authenticated user to skip TOTP two-factor authentication. If an attacker controls or compromises an identity linked to a 2FA-enabled account, including an administrator account, the completed OIDC flow may provide a fully authenticated session.

Affected context

The issue occurs in phpMyFAQ deployments that:

  • Enable Keycloak or Entra ID OIDC single sign-on
  • Link IdP identities to local phpMyFAQ accounts
  • Require TOTP for those accounts
  • Process SSO callbacks without adequately enforcing the local account's second-factor requirement

Risk is greatest when privileged accounts are accessible through the affected SSO integration.

The issue occurs in phpMyFAQ deployments that:

  • Enable Keycloak or Entra ID OIDC single sign-on
  • Link IdP identities to local phpMyFAQ accounts
  • Require TOTP for those accounts
  • Process SSO callbacks without adequately enforcing the local account's second-factor requirement

Risk is greatest when privileged accounts are accessible through the affected SSO integration.

Exploit preconditions

  • Attack surface: Keycloak or Entra ID OIDC callback handling
  • Required access: A valid or compromised IdP identity associated with a phpMyFAQ account
  • Trigger point: Completion of the SSO callback and session establishment
  • Why exploitation is possible: The callback can treat successful IdP authentication as sufficient for a fully authenticated session without consistently requiring the account's TOTP factor
  • Attack surface: Keycloak or Entra ID OIDC callback handling
  • Required access: A valid or compromised IdP identity associated with a phpMyFAQ account
  • Trigger point: Completion of the SSO callback and session establishment
  • Why exploitation is possible: The callback can treat successful IdP authentication as sufficient for a fully authenticated session without consistently requiring the account's TOTP factor

Why this happens

The underlying flaw is an authentication-state validation failure. The SSO callback establishes a session after validating the external identity but does not preserve or enforce the requirement for a configured local second factor before granting full authentication. This behavior maps to CWE-287: Improper Authentication, because the application accepts an incomplete authentication process as proof of the user's full identity and authorization state.

The underlying flaw is an authentication-state validation failure. The SSO callback establishes a session after validating the external identity but does not preserve or enforce the requirement for a configured local second factor before granting full authentication. This behavior maps to CWE-287: Improper Authentication, because the application accepts an incomplete authentication process as proof of the user's full identity and authorization state.

Potential impact

  • An attacker may bypass TOTP protection for a linked account.
  • An attacker could obtain a fully authenticated phpMyFAQ session.
  • Administrative accounts may be taken over if their IdP identities are compromised.
  • An attacker may access, alter, or delete protected knowledge-base content.
  • The incident could enable further abuse of connected identity or application resources.
  • An attacker may bypass TOTP protection for a linked account.
  • An attacker could obtain a fully authenticated phpMyFAQ session.
  • Administrative accounts may be taken over if their IdP identities are compromised.
  • An attacker may access, alter, or delete protected knowledge-base content.
  • The incident could enable further abuse of connected identity or application resources.

General mitigation guidance

Mitigation generally focuses on making multi-factor authentication state explicit and mandatory across every authentication path.

Common defensive patterns include:

  • Require successful TOTP verification before issuing a fully privileged session, including after OIDC callbacks.
  • Represent partially authenticated and fully authenticated states separately.
  • Apply the same second-factor policy to SSO, local login, account linking, recovery, and session refresh flows.
  • Validate issuer, audience, nonce, state, token claims, and account-linking rules for OIDC responses.
  • Use secure-by-default settings that do not silently downgrade MFA requirements for federated users.
  • Minimize administrative privileges and require stronger controls for privileged accounts.
  • Record and alert on SSO sessions that reach privileged functionality without a corresponding second-factor event.

Mitigation generally focuses on making multi-factor authentication state explicit and mandatory across every authentication path.

Common defensive patterns include:

  • Require successful TOTP verification before issuing a fully privileged session, including after OIDC callbacks.
  • Represent partially authenticated and fully authenticated states separately.
  • Apply the same second-factor policy to SSO, local login, account linking, recovery, and session refresh flows.
  • Validate issuer, audience, nonce, state, token claims, and account-linking rules for OIDC responses.
  • Use secure-by-default settings that do not silently downgrade MFA requirements for federated users.
  • Minimize administrative privileges and require stronger controls for privileged accounts.
  • Record and alert on SSO sessions that reach privileged functionality without a corresponding second-factor event.

How teams detect issues like this

High-level detection approaches include:

  • Static analysis and code review for callback handlers that create full sessions immediately after IdP validation.
  • Searching for authentication branches where MFA or TOTP checks are absent, optional, or bypassed for SSO users.
  • Reviewing session-state models for a clear distinction between identity verification and second-factor completion.
  • Testing each supported login, account-linking, recovery, and session-renewal path against the organization's MFA policy.
  • Enforcing policy checks in CI and automated security review tools to prevent authentication flows from omitting required factors.
  • Monitoring identity-provider and application logs for privileged SSO sessions without successful TOTP verification.

High-level detection approaches include:

  • Static analysis and code review for callback handlers that create full sessions immediately after IdP validation.
  • Searching for authentication branches where MFA or TOTP checks are absent, optional, or bypassed for SSO users.
  • Reviewing session-state models for a clear distinction between identity verification and second-factor completion.
  • Testing each supported login, account-linking, recovery, and session-renewal path against the organization's MFA policy.
  • Enforcing policy checks in CI and automated security review tools to prevent authentication flows from omitting required factors.
  • Monitoring identity-provider and application logs for privileged SSO sessions without successful TOTP verification.

Sources

SourceLink
github.comgithub.com/thorsten/phpMyFAQ/security/advisories/GHSA-43g3-pp5p-fg96
github.comgithub.com/thorsten/phpMyFAQ/security/advisories/GHSA-8fvf-747v-qjr6
vulncheck.comvulncheck.com/advisories/phpmyfaq-3.2.0-alpha-before-4.1.9-and-4.2.0-alpha-before-4.2.0-beta-totp-2fa-bypass-via-sso-callbacks

Frequently asked

questions

Yes, where the affected SSO callback is reachable and the attacker possesses or has compromised an IdP identity linked to a phpMyFAQ account. The attacker does not necessarily need the account's TOTP secret.

The attacker generally needs a valid, stolen, or phished Keycloak or Entra ID identity that maps to a phpMyFAQ account. The risk is higher when that account has administrative privileges.

Treat successful OIDC authentication as only one authentication factor and require the account's configured TOTP challenge before creating a fully authenticated session.

Model authentication stages explicitly, apply MFA requirements consistently across all login paths, test privileged SSO flows, and monitor for sessions that bypass expected second-factor events.

Yes, where the affected SSO callback is reachable and the attacker possesses or has compromised an IdP identity linked to a phpMyFAQ account. The attacker does not necessarily need the account's TOTP secret.

The attacker generally needs a valid, stolen, or phished Keycloak or Entra ID identity that maps to a phpMyFAQ account. The risk is higher when that account has administrative privileges.

Treat successful OIDC authentication as only one authentication factor and require the account's configured TOTP challenge before creating a fully authenticated session.

Model authentication stages explicitly, apply MFA requirements consistently across all login paths, test privileged SSO flows, and monitor for sessions that bypass expected second-factor events.

Find out what's already
exploitable in your codebase.