CVE-2026-40165: CWE-287: Improper Authentication in goauthentik authentik
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.
AI Analysis
Technical Summary
authentik versions 2025.12.4 and earlier, as well as 2026.2.0-rc1 through 2026.2.2, contain an authentication bypass vulnerability due to improper extraction of the SAML NameID value. Specifically, an attacker able to modify their NameID value on a SAML Source can inject an XML comment within the NameID, causing authentik to truncate the value and authenticate the attacker as a different user. This attack requires XML Signing to be enabled on the authentik instance. The vulnerability is addressed in versions 2025.12.5 and 2026.2.3.
Potential Impact
Successful exploitation allows an attacker with a valid account on the SAML Source and the ability to modify their NameID to bypass authentication controls and gain access to other user accounts on the authentik instance. This compromises confidentiality and integrity of user accounts but does not affect availability. The CVSS score of 8.7 reflects the high impact on confidentiality and integrity with network attack vector and no privileges required.
Mitigation Recommendations
A fix is available and has been released in authentik versions 2025.12.5 and 2026.2.3. Users should upgrade to these or later versions to remediate the vulnerability. No additional mitigations are indicated by the vendor advisory.
CVE-2026-40165: CWE-287: Improper Authentication in goauthentik authentik
Description
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.
CVSS v3.1
Score 8.7high
Affected software
pkg:github/goauthentik/authentikRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
authentik versions 2025.12.4 and earlier, as well as 2026.2.0-rc1 through 2026.2.2, contain an authentication bypass vulnerability due to improper extraction of the SAML NameID value. Specifically, an attacker able to modify their NameID value on a SAML Source can inject an XML comment within the NameID, causing authentik to truncate the value and authenticate the attacker as a different user. This attack requires XML Signing to be enabled on the authentik instance. The vulnerability is addressed in versions 2025.12.5 and 2026.2.3.
Potential Impact
Successful exploitation allows an attacker with a valid account on the SAML Source and the ability to modify their NameID to bypass authentication controls and gain access to other user accounts on the authentik instance. This compromises confidentiality and integrity of user accounts but does not affect availability. The CVSS score of 8.7 reflects the high impact on confidentiality and integrity with network attack vector and no privileges required.
Mitigation Recommendations
A fix is available and has been released in authentik versions 2025.12.5 and 2026.2.3. Users should upgrade to these or later versions to remediate the vulnerability. No additional mitigations are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-09T19:31:56.014Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a0e487dba1db47362c17654
Added to database: 05/20/2026, 23:49:17 UTC
Last enriched: 05/21/2026, 00:03:32 UTC
Last updated: 07/06/2026, 08:51:19 UTC
Views: 100
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.