External risk intelligence

Authentik SAML Source Account Takeover via XML Comment Injection

CVE advisorySeverity: CRITICAL (CVSS 9.4)

CVE-2026-57580

authentik is an identity provider (IdP), which is designed by nature to be an internet-facing gateway for authentication. It functions as a public-facing service to manage user access and identity assertions, making it a highly likely target for internet-based traffic in standard deployments.

Halo Surface Signal: 5 out of 5 — more likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This vulnerability affects the authentik identity provider, a system managing user access. If an attacker can influence how user identities are presented, they could potentially hijack existing user accounts to gain unauthorized access. The primary concern is confirming if this specific configuration is in use.

  • Attackers could seize user accounts.
  • It impacts how user identities are managed.
  • Confirm if this specific configuration is in use.

Attack Path

How an attacker could exploit the issue

An attacker with an account on a connected identity provider can exploit a misconfiguration in Authentik's SAML handling. By crafting a specific NameID value that includes an XML comment, the attacker can trick Authentik into associating their external identity with a victim's existing account. This allows the attacker to gain full control over the victim's account without needing their password or the identity provider's private key.

  • Requires an attacker-controlled account on a connected IdP.
  • Truncates NameID to link attacker to victim account.
  • Full account takeover and persistent malicious access.

Live Threat

Current exploitation, exposure, and threat context

When configured with specific user-matching modes, authentik could allow an attacker with an account on a source identity provider to inject an XML comment into the NameID. This comment could truncate the value used by authentik, effectively linking the attacker's external identity to a victim's existing account. This could lead to a full account takeover without requiring the victim's password or the identity provider's private key.

  • User account access.
  • Malicious NameID injection.
  • Full account takeover.

Operational Fix

Recommended remediation, mitigation, and detection steps

Security teams managing the authentik identity provider are responsible for addressing this critical vulnerability. The first practical step is to identify all instances of authentik, determine if they are internet-facing or handle sensitive data, and confirm the accountable owner before planning remediation.

  • Authentik administrators own this issue.
  • Verify SAML Source USERNAME_LINK/EMAIL_LINK configurations.
  • Plan remediation based on identified risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is authentik?

authentik is an open-source identity provider (IdP). Organizations use it as a centralized gateway to manage user authentication and access across different applications. By acting as the bridge between users and services, it handles the verification of identity assertions and determines which accounts are granted access to specific resources within an environment.

What does CWE-436 mean for CVE-2026-57580?

CWE-436 refers to improper interpretation of syntactically different semantic data. In this specific vulnerability, authentik incorrectly processes XML comments within a SAML NameID field. Because the software truncates the identifier at the comment while keeping the broader assertion valid, it can mistakenly link an attacker's external identity to a legitimate user's existing account.

How can an attacker trigger this vulnerability?

An attacker needs an account on a SAML identity provider connected to the target authentik instance. They exploit the bug by injecting a crafted XML comment into their own NameID. This does not trigger if you are using the default unique-identifier matching mode or if the system is acting as an outbound SAML Provider. The vulnerability specifically targets non-default matching modes like USERNAME_LINK or EMAIL_LINK.

Is my authentik instance at high risk?

Halo Surface Signal notes that authentik is naturally designed as an internet-facing gateway, making it a likely target for network-based traffic. If your instance is exposed to the internet, it is inherently more visible to external actors. You should prioritize assessment if your deployment is publicly reachable, as this increases the potential for unauthorized parties to interact with your SAML Source configurations.

What should I do to secure my authentik installation?

First, review your SAML Source settings to see if you have enabled USERNAME_LINK or EMAIL_LINK matching modes. If these are in use, update your authentik instance to version 2026.2.6 or 2026.5.5 immediately. These versions contain the necessary logic changes to prevent XML comment truncation, effectively neutralizing the risk of account takeover while maintaining your existing authentication workflows.

References