GHSA-gvx2-mwmj-wwvj: SuperTokens Core: SAML XML Signature Wrapping authentication bypass — any IdP user can authenticate as any other user
SuperTokens Core is an open source authentication server. From 11.3.0 until 11.3.7, 11.4.7, and 12.0.10, SAML.verifySamlResponseSignature calls OpenSAML SignatureValidator.validate without first applying SAMLSignatureProfileValidator. The Core can therefore accept a cryptographically valid signature that references a different XML element from the Response or Assertion whose NameID and attributes are used for authentication. An ordinary user of the configured identity provider can move a genuinely signed element elsewhere in the document while supplying an attacker-authored identity-bearing element, causing XML Signature Wrapping authentication as another IdP user. Both response-level and assertion-level signing paths are affected, and SP-initiated login remains reachable without enabling allowIDPInitiatedLogin. This issue is fixed in versions 11.3.7, 11.4.7, and 12.0.10.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
SuperTokens Coreto a version that resolves this vulnerability.Fixed in 11.3.7 - Upgrade
Upgrade
SuperTokens Coreto a version that resolves this vulnerability.Fixed in 11.4.7 - Upgrade
Upgrade
SuperTokens Coreto a version that resolves this vulnerability.Fixed in 12.0.10
Event History
Frequently Asked Questions
Which deployments are affected?
SuperTokens Core deployments running versions from 11.3.0 up to, but not including, 11.3.7, 11.4.7, or 12.0.10 are affected when using SAML authentication. Both response-level and assertion-level SAML signing paths are affected.
What does an attacker need to exploit this issue?
The attacker needs to be an ordinary user of the configured identity provider and obtain a genuinely signed SAML element. They can then alter the XML document so that an attacker-controlled Response or Assertion supplies the NameID and attributes used for authentication.
Is IdP-initiated login required for exploitation?
No. SP-initiated login remains reachable even when allowIDPInitiatedLogin is not enabled.
How should affected deployments be remediated?
Upgrade SuperTokens Core to 11.3.7, 11.4.7, or 12.0.10, as appropriate for the deployed release line.