Summary
CVE-2026-57580 is a critical authentication bypass in authentik, an open-source Identity Provider, caused by an XML comment injection flaw (CWE-436, Interpretation Conflict) in inbound SAML source handling. The vulnerability enables full account takeover without the victim’s password or the identity provider’s private key, and carries a CVSS score of 9.4 (Critical).
Technical details
- Root cause: authentik’s inbound SAML Source processing does not consistently handle XML comments embedded within the
NameIDfield, so the value used for signature verification can differ from the value later used for user matching. - Trigger conditions: Exploitable only when a SAML Source is configured with a non-default user-matching mode —
USERNAME_LINKorEMAIL_LINK. The default unique-identifier matching mode, and outbound SAML Provider functionality, are not affected. - Attack vector: An attacker who controls an account on the upstream (source) identity provider can set that account’s
NameIDto a value containing an injected XML comment. The comment causes the string used for account matching to be truncated in a way that matches a victim’s existing username or email, while the signed assertion remains cryptographically valid. - Impact: Binding of the attacker’s external identity to a victim’s existing authentik account, resulting in complete account takeover — no credentials or IdP signing key required.
Affected software
- authentik versions prior to 2026.2.6
- authentik versions 2026.5.0 up to (but not including) 2026.5.5
Severity
- CVSS v4.0: 9.4 (Critical) —
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N - A CVSS v3.1 scoring of the same issue has also been published at 8.7 (High) —
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N
Mitigation and recommended actions
- Immediate: Upgrade to authentik 2026.2.6 or 2026.5.5, whichever release line applies to your deployment.
- If patching is not immediately possible:
- Reconfigure any affected SAML Source to use the default unique-identifier matching mode instead of
USERNAME_LINKorEMAIL_LINK(note this changes identity-linking behavior). - Add a SAML Source property mapping that rejects assertions containing XML comments in the
NameIDor attribute values.
- Reconfigure any affected SAML Source to use the default unique-identifier matching mode instead of

