/

CVE-2026-123802

Severity:

HIGH RISK

(8.1)

SAML Authentication Bypass (CWE-287) in SuperTokens Core

CVE-2026-123802

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287, CWE-345, CWE-1220

Impact:

Authentication as another user and unauthorized access

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

A SAML validation flaw in SuperTokens Core can allow an attacker to authenticate as an identity-provider user without the relevant assertion satisfying the target deployment's audience check. This can occur in licensed deployments with a configured SAML client when an attacker has suitable valid IdP-signed assertions, or when an assertion issued for another deployment is accepted due to a shared default service-provider entity ID.

Affected context

The issue affects licensed SuperTokens Core deployments with a configured SAML client in the affected release ranges. One variant involves assertion-level signing and multiple assertions, where audience validation and claim extraction can rely on different assertions; response-level signing does not expose that variant. Separately, an assertion for another SuperTokens deployment may pass the audience check when deployments share the default saml_sp_entity_id.

Exploit preconditions

  • Attack surface: SAML authentication for a configured client in a licensed deployment
  • Required access: The attacker needs suitable valid assertions signed by the relevant identity provider, or an assertion issued to another deployment that shares the default service-provider entity ID
  • Trigger point: The target deployment processes and validates the SAML response
  • Why exploitation is possible: Audience validation may accept an audience from one assertion while authentication claims are extracted from another, or a shared default entity ID may make an assertion intended for another deployment appear to match the target

Why this happens

The authentication flow does not consistently bind the assertion used to satisfy audience validation to the assertion supplying the authenticated identity's NameID and attributes. This is an authentication-verification weakness associated with CWE-287: Improper Authentication and CWE-345: Insufficient Verification of Data Authenticity. Reusing a default service-provider entity ID across deployments can also weaken the separation between their intended SAML audiences.

Potential impact

  • An attacker may be authenticated as a victim IdP user
  • The attacker could gain access to resources available to that user
  • An affected deployment may experience unauthorized actions or exposure of user data

General mitigation guidance

Defensive patterns include binding audience validation and identity-claim extraction to the same verified assertion, and rejecting ambiguous or inconsistent multi-assertion responses. Deployments can use unique, explicitly configured service-provider entity IDs and strict SAML response validation rather than relying on shared defaults. Limiting the privileges of authenticated accounts and applying least-privilege access controls can reduce potential impact if an identity is misattributed.

How teams detect issues like this

Review SAML validation paths to confirm that the audience, signature, issuer, and extracted identity claims all refer to the same verified assertion. Use static analysis and code review to look for validation and claim-extraction logic that selects from different assertions, as well as shared or implicit service-provider entity IDs. Runtime monitoring can flag unexpected audiences, duplicate or multiple assertions, and authentication events inconsistent with expected identity-provider and deployment mappings. Policy checks can require unique entity IDs and strict SAML validation settings.

Sources

SourceLink
github.comgithub.com/supertokens/supertokens-core/commit/00a15e045323ba8a566ca6f59b70125b4030ab6c
github.comgithub.com/supertokens/supertokens-core/commit/1645915320c5dfc22bce9029eb7d8364f8df402f
github.comgithub.com/supertokens/supertokens-core/commit/1d0fd5b40848629295cf86d47be185f92f31e445
github.comgithub.com/supertokens/supertokens-core/commit/324686349b21ab46fe465ca5f74294d6c68d3859
github.comgithub.com/supertokens/supertokens-core/commit/53f42f496477e7cc3ccd48fe57851fa08d06a248
github.comgithub.com/supertokens/supertokens-core/commit/5ffdd887b470035f409d61f85f2186381ad9cdd6
github.comgithub.com/supertokens/supertokens-core/commit/8e69a85e38709b832869c3bfc83df9a150d6f3cf
github.comgithub.com/supertokens/supertokens-core/commit/a2483b692d43294fdb9ad2f8f6f831cca8300081
github.comgithub.com/supertokens/supertokens-core/commit/b21760ceb5089b0fa30c8fd46f7bbfc680de56dd
github.comgithub.com/supertokens/supertokens-core/commit/c77b13061176d9bd50ed24a9cf50ffbcdf332ee5
github.comgithub.com/supertokens/supertokens-core/commit/f4ddc022ef1ee17933efb710c21a960cb4ada083
github.comgithub.com/supertokens/supertokens-core/releases/tag/v11.3.8
github.comgithub.com/supertokens/supertokens-core/releases/tag/v11.4.8
github.comgithub.com/supertokens/supertokens-core/releases/tag/v12.0.11
github.comgithub.com/supertokens/supertokens-core/releases/tag/v12.1.2
github.comgithub.com/supertokens/supertokens-core/releases/tag/v12.2.1
github.comgithub.com/supertokens/supertokens-core/releases/tag/v12.3.1
github.comgithub.com/supertokens/supertokens-core/security/advisories/GHSA-wfg2-vqfg-rqh6

Frequently asked

questions

Licensed SuperTokens Core deployments with a configured SAML client may be affected when the relevant SAML validation conditions are present.

The described scenarios rely on valid IdP-signed assertions or on an assertion issued to another deployment that shares the default service-provider entity ID. The attacker does not necessarily need a normal account on the target deployment.

Ensure audience validation, signature verification, and identity-claim extraction are bound to the same verified assertion, and use a unique service-provider entity ID for each deployment.

Apply strict SAML validation, reject ambiguous assertion sets, avoid shared identity configuration defaults, and review authorization controls so authenticated identities receive only necessary access.

Find out what's already
exploitable in your codebase.