authentik: SAML NameID XML Comment Injection Enables Authentication Bypass via Identifier Truncation
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-287.
Summary
authentik is an open-source identity provider. Versions 2025.12.4 and prior, and versions 2026.2.0-rc1 through 2026.2.2 were vulnerable to Authentication Bypass through SAML NameID XML Comment Injection. Due to how authentik extracted the NameID value from a SAML assertion, it was possible for an attacker to trick authentik into only seeing a part of the NameID value, potentially allowing an attacker to gain access to other accounts. This issue could be exploited on an authentik instance with a SAML Source, where the attacker had an account on the SAML Source and the ability to modify their NameID value (commonly username or E-mail), and XML Signing was enabled. The attacker could modify the SAML assertion given to authentik by injecting a comment within the NameID value, which effectively truncated the NameID value to the snippet before the comment, and gave the attacker access to any user account. This issue has been fixed in versions 2025.12.5 and 2026.2.3.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| goauthentik | authentik | before 2025.12.5; 2026.2.0-rc1 to before 2026.2.3 | 2025.12.5, 2026.2.3 | Patch available | CNA |
- authentik Vendorgoauthentik Affected before 2025.12.5; 2026.2.0-rc1 to before 2026.2.3 Fixed in 2025.12.5, 2026.2.3 Patch available CNA
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:goauthentik:authentik:*:*:*:*:*:*:*:* | — | — | goauthentik |
- cpe:2.3:a:goauthentik:authentik:*:*:*:*:*:*:*:* Versions — — ·goauthentik
Remediation
- Fix · CNA authentik (goauthentik) Fixed in 2025.12.5, 2026.2.3
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40165
- 2026-10-25 EPSS moved to the below the 50th percentile
References
More goauthentik vulnerabilities
- TI-2026-36603 authentik: SourceStage bypass via empty POST CVSS 3.1CRITICAL 9.8
- TI-2022-07608 authentik vulnerable to Improper Authentication via invitation URL token reuse CVSS 3.1CRITICAL 9.4
- TI-2026-36598 authentik: `UserSourceConnection.user` and `GroupSourceConnection.group` are changeable through the API CVSS 3.1HIGH 8.8
- TI-2022-22816 authentik allows existing authenticated users to create arbitrary accounts CVSS 3.1MEDIUM 6.4
- TI-2026-41431 authentik: Account Takeover via SAML NameID Comment Truncation CVSS 4.0CRITICAL 9.4
- TI-2024-25628 Insufficient access control for OAuth2 Device Code flow in authentik CVSS 3.1CRITICAL 9.8
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences