/

CVE-2026-123801

Severity:

HIGH RISK

(7.4)

SAML Assertion Replay (CWE-294) in SuperTokens Core

CVE-2026-123801

Deferred

Vulnerability type

Category:

SAML Assertion Replay and Authentication Flow Validation

CWE:

CWE-294, CWE-346, CWE-384

Impact:

Authentication Bypass and Identity Substitution

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

SuperTokens Core's SAML callback does not sufficiently bind assertions to login requests or prevent previously accepted assertions from being reused. An attacker who obtains a valid SAML response may be able to replay it to mint additional authorization codes or, in some flows, complete a login with an unintended identity.

Affected context

The issue affects SuperTokens Core's SAML callback handling in SP-initiated and IdP-initiated login flows. The risk arises when the callback accepts assertions without consuming RelayState, recording assertion identifiers, or enforcing request and recipient-related checks. Exploitation depends on obtaining a valid assertion and, for SP-initiated replay, its matching RelayState while the assertion remains valid.

Exploit preconditions

  • Attack surface: The SAML callback endpoint, /recipe/saml/callback
  • Required access: The attacker must obtain a valid SAML response; SP-initiated replay also requires its matching RelayState.
  • Trigger point: Submission of the response to the callback before the assertion expires; IdP-initiated assertions may be replayed without RelayState.
  • Why exploitation is possible: The callback does not reliably consume RelayState, track used assertion identifiers, bind the response to the pending request using Response.InResponseTo, or validate relevant destination and subject-confirmation constraints.

Why this happens

The callback accepts SAML assertions without enforcing sufficient freshness, uniqueness, recipient, and request-binding checks. This creates an authentication replay weakness, associated with CWE-294, and can also involve CWE-346 when the response's origin or intended recipient is not properly validated. Failure to correlate an assertion with the pending login can enable identity substitution, related to CWE-384 session fixation and authentication-flow binding concerns.

Potential impact

  • A previously accepted assertion could be replayed to obtain additional independently redeemable authorization codes.
  • A login flow could be completed using an assertion associated with a different identity.
  • IdP-initiated login could be accepted even when that flow is intended to be disabled.
  • An attacker could gain access as the identity represented by a captured assertion.

General mitigation guidance

Defensive patterns focus on strict assertion validation and binding each response to a single login transaction.

  • Reject assertions that have already been used, and enforce assertion expiry.
  • Consume and validate RelayState and require Response.InResponseTo to match the pending request where applicable.
  • Validate the response destination and subject-confirmation recipient and time constraints.
  • Enforce the configured policy for IdP-initiated login.
  • Ensure authorization codes are issued only after all checks succeed, and apply least privilege to resulting sessions and tokens.

How teams detect issues like this

Review SAML callback code for assertion replay protection, request correlation, and validation of destination, recipient, and time conditions. Static analysis and code review can flag missing checks around SAML response handling and repeated authorization-code issuance. Runtime monitoring can look for repeated assertion identifiers, unexpected callback reuse, mismatched request identifiers, and IdP-initiated logins that conflict with policy.

Frequently asked

questions

The vulnerable surface is the SAML callback endpoint, but exploitation requires obtaining a valid assertion. SP-initiated replay also requires the matching RelayState; IdP-initiated replay does not.

The key prerequisite is access to a still-valid SAML response. The description does not establish that every deployment or attacker can obtain one.

Treat each assertion as single-use, enforce expiry and recipient checks, and bind responses to the corresponding pending login request.

Apply comprehensive SAML response validation, enforce the configured login-flow policy, and test replay, request-correlation, and identity-mismatch cases.

Find out what's already
exploitable in your codebase.