CVE-2026-40165: CWE-287: Improper Authentication in goauthentik authentik
A high-severity authentication bypass vulnerability (CVE-2026-40165) affects the open-source identity provider authentik in versions prior to 2025. 12. 5 and between 2026. 2. 0-rc1 and 2026. 2. 2. The flaw arises from improper handling of the SAML NameID value, where an attacker with an account on the SAML Source and the ability to modify their NameID can inject an XML comment to truncate the NameID value. This allows the attacker to impersonate other user accounts when XML Signing is enabled. The issue has been fixed in authentik versions 2025.
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
A high-severity authentication bypass vulnerability (CVE-2026-40165) affects the open-source identity provider authentik in versions prior to 2025. 12. 5 and between 2026. 2. 0-rc1 and 2026. 2. 2. The flaw arises from improper handling of the SAML NameID value, where an attacker with an account on the SAML Source and the ability to modify their NameID can inject an XML comment to truncate the NameID value. This allows the attacker to impersonate other user accounts when XML Signing is enabled. The issue has been fixed in authentik versions 2025.
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: 5/20/2026, 11:49:17 PM
Last enriched: 5/21/2026, 12:03:32 AM
Last updated: 5/21/2026, 1:04:47 AM
Views: 9
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.