Security Resilience

CVE-2026-40165

Auth Bypass in goauthentik authentik

Published
21 May 2026
Modified
23 July 2026
CVSS Score v3.1 8.7
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N
EPSS Score 0.0068 47th percentile
Risk Priority 62 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-40165 is a high-severity aka Blind XPath Injection (CWE-91) vulnerability in goauthentik authentik (named in the CVE record; NVD lists no product yet). Its CVSS base score is 8.7 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 47th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to IA-2 (Identification and Authentication (Organizational Users)) and IA-3 (Device Identification and Authentication) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1565 Data Manipulation Impact
Adversaries may insert, delete, or manipulate data in order to influence external outcomes or hide activity, thus threatening the integrity of the data.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-76979Shared CWE-91
CVE-2026-32870Shared CWE-91
CVE-2023-43187Shared CWE-91
CVE-2026-55789Shared CWE-91
CVE-2026-133303Shared CWE-91
CVE-2026-110084Shared CWE-91
CVE-2025-25589Shared CWE-91
CVE-2025-49538Shared CWE-91
CVE-2026-65124Shared CWE-91
CVE-2023-27253Shared CWE-91

Affected Assets

goauthentik
authentik
named in the CVE record; NVD lists no product yet

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Mandates unique identification and authentication of organizational users before access, directly stopping improper authentication.

Requires unique identification and authentication of devices before establishing connections, preventing unauthenticated device claims.

Mandates unique identification and authentication of non-organizational users, directly addressing the weakness for external actors.

Manages authenticators with verification and secure distribution, reducing opportunities for improper authentication.

Developer testing and evaluation can discover cases where two products interpret the same inputs or state transitions differently.

Input validation directly stops unneutralized XML metacharacters from reaching the parser.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC directly requires input neutralization and validation that eliminates XML injection flaws.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing catches XML injection during development but does not itself implement the fix.

blocks

Mandating segregated approval and oversight for non-human identities reduces the chance that weak or orphaned credentials can be exploited for unauthorized authentication.

finds

Monitoring can detect exploitation but provides no preventive control over XML handling.

removes

A.8.19 governs the process of installing and updating software on operational systems to maintain integrity, but XML Injection (CWE-91) is a first-party code defect introduced during implementation, not a flaw in a third-party component that an installation or update process would replace or remove.

prevents

Secure coding standards require proper neutralization of XML metacharacters, directly eliminating CWE-91.

prevents

A.8.30 carries its effect through the secure-development practices its contract requires of the supplier (8.25 to 8.29), so it reduces ordinary software implementation weaknesses like XML injection the way those practices do, at `partial` -- the practice is fallible and a different clause carries the stronger effect. A.8.30 carries a declared CEILING of `partial` on this verb.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

  • No fine-grained STIG row for CWE-287, a class-level weakness. Rules are authored against its narrower children: CWE-295, CWE-306.
  • No fine-grained STIG row for CWE-436, a class-level weakness, and none of its children carries one either.

References