/

CVE-2026-123798

Severity:

HIGH RISK

(8.1)

XML Signature Wrapping (CWE-347) in SuperTokens Core

CVE-2026-123798

Deferred

Vulnerability type

Category:

XML Signature Wrapping

CWE:

CWE-287, CWE-347

Impact:

Authentication Bypass and User Impersonation

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

SuperTokens Core can accept a valid SAML signature without ensuring that it covers the Response or Assertion whose identity data is used for authentication. A user of a configured identity provider could exploit this mismatch to authenticate as another IdP user when a crafted SAML response is processed.

Affected context

The issue occurs in SuperTokens Core's SAML response-signature verification paths, including both response-level and assertion-level signing. Risk arises when signature validation does not verify that the signed XML element is the same element from which authentication identity and attributes are read; SP-initiated login can also reach the affected flow.

Exploit preconditions

  • Attack surface: SAML sign-in through a SuperTokens Core deployment configured with an identity provider
  • Required access: The attacker must be an ordinary user of that configured identity provider
  • Trigger point: Processing a SAML response during login, including an SP-initiated login
  • Why exploitation is possible: Signature validity is accepted without adequately binding the signature reference to the Response or Assertion used for authentication

Why this happens

The verification logic validates a cryptographic signature without first applying the SAML signature profile checks needed to ensure that the signature refers to the relevant XML element. This permits a mismatch between the element covered by a valid signature and the identity-bearing element consumed by the application, a form of XML Signature Wrapping. It relates primarily to CWE-347: Improper Verification of Cryptographic Signature and can result in an authentication decision that does not reflect the signed identity data.

Potential impact

  • An attacker may be authenticated as another user of the configured identity provider
  • The affected application account could be accessed or impersonated
  • Actions performed through the application could be attributed to the impersonated user

General mitigation guidance

Defensive approaches focus on validating both the signature and its relationship to the exact XML element used for authentication.

  • Apply SAML signature profile validation before accepting a signature
  • Bind verified signatures to the specific Response or Assertion from which identity data is extracted
  • Use well-maintained SAML libraries and avoid custom XML signature handling
  • Parse identity and attributes only from the verified element, with strict structural and schema checks
  • Apply least privilege to application accounts and sensitive operations, and avoid trusting identity data that has not passed the complete verification process

How teams detect issues like this

  • Review SAML verification code for signature validation that is not paired with profile and reference checks
  • Trace whether the Response or Assertion whose identity fields are consumed is the same element covered by the verified signature
  • Use static analysis or security review rules to flag XML signature verification paths that omit signature-profile validation
  • Enforce SAML configuration and implementation policies that require verified-element binding and strict document structure

Sources

SourceLink
github.comgithub.com/supertokens/supertokens-core/commit/8d06b0cfb5409c5bf505051ddfcb94d66367caae
github.comgithub.com/supertokens/supertokens-core/commit/9cba541ae2ed87b878d11b257bc9b8b78341f50a
github.comgithub.com/supertokens/supertokens-core/commit/d0773f2a6497411aeda5d4f03d3d135a2a3ae79c
github.comgithub.com/supertokens/supertokens-core/releases/tag/v11.3.7
github.comgithub.com/supertokens/supertokens-core/releases/tag/v11.4.7
github.comgithub.com/supertokens/supertokens-core/releases/tag/v12.0.10
github.comgithub.com/supertokens/supertokens-core/security/advisories/GHSA-gvx2-mwmj-wwvj

Frequently asked

questions

An ordinary user of an identity provider configured for the affected SuperTokens Core deployment could potentially exploit the SAML authentication flow.

No. SP-initiated login can also reach the affected verification path; enabling IdP-initiated login is not a prerequisite.

Validate the SAML signature profile and ensure the verified signature covers the exact Response or Assertion used to obtain identity data.

Use established SAML libraries, enforce strict document and signature-reference validation, and review that authentication consumes only data from the verified XML element.

Find out what's already
exploitable in your codebase.