/

CVE-2026-56425

Severity:

HIGH RISK

(8.8)

Session Fixation (CWE-384) in Azure AD OAuth Plugin

CVE-2026-56425

Analyzed

Vulnerability type

Category:

Session Management Vulnerability

CWE:

CWE-384

Impact:

Session Hijacking and Authentication Bypass Risks

Severity:

HIGH RISK

(8.8)

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

The Azure Active Directory authentication plugin's OAuth 2.0 flow reused long-lived PHP session identifiers as the state parameter and failed to rotate sessions after login, exposing users to session fixation and hijacking.

Combined with missing HTTPS enforcement for redirect URIs and unsafe logging of attacker-controlled parameters, these weaknesses increase the risk of credential leakage, replay attacks, and audit log corruption during authentication.

Affected context

This vulnerability occurs in applications integrating Azure Active Directory via the affected OAuth 2.0 plugin when the PHP session identifier doubles as the OAuth state parameter and is reused across authentication cycles.

It is most relevant in deployments where redirect URIs may not be enforced as HTTPS, and where application or infrastructure logs capture full OAuth URLs or error responses containing user-controlled parameters.

Risk is elevated when logs are broadly accessible, reverse proxies or external monitoring systems record request metadata, or users authenticate over unencrypted connections.

Exploit preconditions

  • Attack surface: The OAuth 2.0 authorization and callback endpoints exposed by the Azure AD authentication plugin.
  • Required access: Ability to observe or influence OAuth requests and responses (e.g., via shared logs, browser history, referrer headers, network sniffing on HTTP, or crafted authentication flows).
  • Trigger point: Initiation of the OAuth login process, including redirect to the identity provider and handling of the callback with the state parameter, authorization code, and error parameters.
  • Why exploitation is possible:
  • The PHP session identifier is directly reused as the OAuth state, causing it to appear in URLs, logs, and headers.
  • Session IDs are not rotated after successful authentication, enabling session fixation when a victim authenticates under an attacker-controlled session.
  • The state value is not treated as a dedicated, single-use nonce, weakening CSRF and replay defenses around the callback.
  • Redirect URIs can be non-HTTPS, allowing authorization codes and tokens to traverse the network in plaintext.
  • Error responses containing attacker-controlled parameters are logged without sanitization or length limits, allowing log forging and injection.

Why this happens

The primary root cause aligns with CWE-384: Session Fixation, where the application fails to ensure that a fresh session identifier is created after authentication and instead reuses a potentially attacker-controlled session ID.

Conceptually, the plugin conflates authentication credentials (the PHP session identifier) with protocol integrity metadata (the OAuth state parameter), causing sensitive session tokens to be embedded in redirect URLs and observable across multiple layers of infrastructure.

The state parameter is not implemented as a dedicated, cryptographically strong, single-use nonce, weakening its role as a CSRF token and replay safeguard in OAuth flows.

Additional contributing patterns include insufficient transport-layer protections (accepting non-HTTPS redirect URIs) and unsafe logging of user-supplied error parameters, which together expose tokens, authorization codes, and arbitrary log content to attackers.

Potential impact

  • Attackers may hijack active user sessions by obtaining leaked PHP session identifiers.
  • Attackers could perform session fixation attacks, forcing victims to authenticate under a known session ID and later reusing it.
  • CSRF protections around the OAuth callback can be weakened, enabling unauthorized or replayed authorization responses.
  • Authorization codes and access tokens may be intercepted over the network if non-HTTPS redirect URIs are used.
  • Application and audit logs could be forged, injected with misleading entries, or corrupted using crafted error parameters.
  • Security monitoring and incident response may be undermined due to compromised or ambiguous log integrity.

General mitigation guidance

Effective mitigation focuses on strengthening session management and protocol integrity boundaries within the OAuth 2.0 integration.

Common patterns include:

  • Ensuring session identifiers are treated solely as authentication credentials and never embedded in protocol parameters such as state or redirect URLs.
  • Rotating the session identifier upon successful authentication and at other trust boundary transitions to prevent fixation.
  • Implementing state as a dedicated, cryptographically random, single-use nonce tied to the user's session and invalidated after the callback.
  • Enforcing HTTPS-only redirect URIs and rejecting any non-TLS endpoints for OAuth callbacks to protect authorization codes and tokens in transit.
  • Reducing log exposure by sanitizing, truncating, and structuring logged parameters, avoiding direct inclusion of attacker-controlled content.
  • Applying least-privilege access and strict controls around log storage, ensuring sensitive tokens or identifiers are not recorded where possible.

How teams detect issues like this

Detection typically involves a combination of configuration review, code analysis, and log inspection:

  • Perform targeted code reviews on authentication modules to verify that session identifiers are rotated after login and never reused as protocol integrity parameters like state.
  • Use static analysis or linters to flag patterns where session IDs appear in URLs, GET parameters, or are written to logs, and where state lacks nonce properties (e.g., deterministic or long-lived values).
  • Evaluate OAuth configuration for redirect URIs that permit non-HTTPS schemes, and enforce policy checks that require TLS for all callback endpoints.
  • Inspect logging code paths that handle OAuth error responses and ensure attacker-controlled inputs are validated, sanitized, and length-limited before recording.
  • Consider automated security testing tools that can simulate OAuth flows, detect session fixation behaviors, and highlight CSRF weaknesses around state validation.

Sources

SourceLink
github.comgithub.com/MISP/MISP/commit/146bc40ad6e10a44f01e8ed62d5f7bc9c06cc4fa

Frequently asked

questions

Exploitability depends on the environment: in setups where OAuth URLs and logs are widely accessible or HTTP is allowed for redirect URIs, attackers have more opportunities to observe session IDs, codes, and tokens, increasing the practical risk of hijacking and fixation attacks.

An attacker generally needs the ability to observe OAuth traffic or logs (such as access to shared logging infrastructure, reverse proxies, or sniffing unencrypted HTTP) or to influence the victim's initial session state, for example by tricking them into using a predetermined session identifier.

The safest approach is to decouple session identifiers from OAuth protocol parameters, rotate the session ID after authentication, enforce HTTPS-only redirect URIs, implement a cryptographically random single-use state nonce with strict validation, and sanitize all logged error parameters before storage.

Future implementations should follow established OAuth 2.0 security best practices, including treating state purely as a CSRF-resistant nonce, enforcing TLS for all callbacks, adopting robust session lifecycle management, performing security-focused code reviews on auth flows, and applying secure logging guidelines that minimize exposure of sensitive or attacker-controlled data.

Find out what's already
exploitable in your codebase.