authentik
CVE-2026-40172
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate as delegated user-admin
-
DeliveryEnumerate superuser group PK via /api/v3/core/groups/
-
ExploitSend PATCH /api/v3/core/users/{pk}/ adding superuser group
-
InstallUserSerializer bypasses enable_group_superuser check
-
C2Target account inherits is_superuser=True
-
ExecuteLog in with elevated session
-
ImpactPivot to federated applications as administrator
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V8 - Authorization Least privilege enforcement
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must possess a valid authentik session with the change_user permission on the target user (or equivalent group-modification permission), matching CVSS PR:L - this is exactly the delegated user-administration role that authentik documents as safe to grant to help-desk staff, so the realistic precondition is 'any tenant that has delegated user management to non-superusers'. A superuser group with is_superuser=True must already exist in the deployment (the default authentik installation ships such a group), and the /api/v3/core/users/{pk}/ endpoint must be network-reachable from the attacker. Limiting factors: deployments that have not delegated change_user or group-edit permissions outside the existing administrator pool gain no new attack surface from this bug, and pre-release-only deployments on the 2026.2 line before rc1 are not affected. |
| Impact | The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H aligns with the description: the attack is network-reachable, requires only low (delegated) privileges, needs no user interaction, and produces high integrity and availability impact while confidentiality impact is rated none (the act of granting a group does not by itself read data, although the resulting superuser session obviously can). The 8.1 base score is credible for an identity provider because compromise of the IdP cascades into every federated application. No EPSS, KEV, or POC signal is present in the supplied data, so this is currently a high-severity but not-yet-actively-exploited issue; however, the simplicity of the exploit (one authenticated PATCH call) means EPSS is likely to rise quickly once the advisory propagates. Defenders who have delegated any user-management permission to non-administrators should treat this as a real priority rather than a theoretical CVSS-inflation case. |
| Exploit ScenarioDerived | A help-desk operator (or any attacker who has compromised a help-desk account) who has been granted the change_user permission sends a single authenticated PATCH /api/v3/core/users/{pk}/ request with a JSON body that adds the built-in superuser group to their own user record or to a controlled service account. On the next session refresh the targeted account inherits is_superuser=True, granting full control of authentik and, through federation, every downstream application that trusts it. No public exploit code is identified at time of analysis, but the exploit reduces to one HTTP request and could be reproduced from the advisory text alone. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 22, 2026
Privilege escalation in authentik identity provider versions prior to 2025.12.5 and 2026.2.0-rc1 through 2026.2.2 allows an authenticated user holding the change_user permission to assign arbitrary groups - including superuser groups - to any target user via the PATCH /api/v3/core/users/{pk}/ endpoint. The UserSerializer skips the enable_group_superuser check enforced in the dedicated group-management paths, letting delegated user-management roles promote themselves or others to administrator-equivalent privilege. No public exploit identified at time of analysis and the vulnerability is not listed in CISA KEV, but the trivial attack mechanics (a single PATCH request) make weaponization straightforward for any tenant that has delegated user administration.
RemediationAI
Vendor-released patch: upgrade to authentik 2025.12.5 on the stable branch or 2026.2.3 on the 2026.2 release line, per the vendor advisory GHSA-h6x7-hjjc-wjc9 and the release notes at https://github.com/goauthentik/authentik/releases/tag/version%2F2025.12.5 and https://github.com/goauthentik/authentik/releases/tag/version%2F2026.2.3. Until the upgrade is rolled out, audit and revoke any custom roles or RBAC bindings that grant authentik_core.change_user or group-modification permissions to non-administrator principals, since the vulnerability is only reachable by accounts already holding one of those delegations; the trade-off is that legitimate help-desk or onboarding workflows that depend on those permissions will be temporarily blocked. Additionally, review the membership of any group whose is_superuser flag is true and constrain network access to the /api/v3/core/users/ endpoint via reverse-proxy ACLs where feasible, accepting that this will also restrict the legitimate admin UI which uses the same API.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
authentik is a widely deployed open-source identity and access management platform (CPE cpe:2.3:a:goauthentik:authentik) that exposes a Django REST Framework API for user and group administration. The root cause is CWE-269 Improper Privilege Management: the UserSerializer used by the user PATCH endpoint accepts a 'groups' field and writes it directly to the relation without re-validating whether the calling principal is permitted to confer the privileges granted by those groups. authentik already enforces a stricter check - enable_group_superuser - on the group-management code path to prevent delegated group editors from creating or modifying superuser groups, but that gate was never mirrored on the user-update path, so the same restricted role can simply attach an existing superuser group to a target user as an indirect route to the same outcome.
Know when Authentik gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Primary rating from Vendor (GitHub_M) · only source for this CVE.
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
authentik is an open-source identity provider. In versions prior to 2025.12.5 and 2026.2.0-rc1 through 2026.2.2, the PATCH /api/v3/core/users/{pk}/ API allows a caller with change_user on a target user to assign arbitrary groups through UserSerializer, including groups with is_superuser=True, without requiring enable_group_superuser, leading to privilege escalation. This bypasses the stricter permission model enforced in group-management paths and enables delegated user-management permissions to escalate target users to administrator-equivalent privilege. Users with permissions to update groups or permissions to update users are able to add themselves or other users they have permissions on to users which have superuser permissions. This issue has been fixed in versions 22025.12.5 and 2026.2.3.
Executive ViewAI
Authentik identity provider versions prior to 2025.12.5 contain a privilege escalation vulnerability (CVE-2026-40172, CVSS 8.1) allowing any user with user management permissions to promote themselves or others to administrator-equivalent status in a single API request. While no public exploit has been identified, the simplicity of the attack vector makes rapid mitigation essential for organizations that have delegated user administration. This directly compromises the integrity of organizational access control.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) restrict 'change_user' permission to essential administrators only; (2) enable detailed API audit logging for user management PATCH requests; (3) audit current superuser group memberships for unauthorized additions; (4) require approval workflow for group assignment changes; (5) implement real-time alerting for superuser group modifications.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Affected Products (CPE)CVE.org
authentik is an open-source identity provider. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploi
authentik is an open-source Identity Provider focused on flexibility and versatility. Rated high severity (CVSS 8.8), th
authentik is an open-source Identity provider focused on flexibility and versatility. Rated medium severity (CVSS 6.4),
Authentication bypass in authentik identity provider (versions prior to 2025.12.6, 2026.2.4, and 2026.5.1) allows remote
authentik is an open-source Identity Provider. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploi
authentik is an open-source Identity Provider. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploi
authentik is an open-source identity provider. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploi
authentik is an open-source identity provider. After authorizing access to a RAC endpoint, authentik creates a token whi
Account takeover in authentik (goauthentik) identity provider before 2026.2.6 and 2026.5.5 allows an attacker holding an
Cross-site scripting in authentik identity provider versions prior to 2025.12.5 and 2026.2.3 allows remote attackers to
Code injection in authentik identity provider from 2021.3.1 through multiple versions. Users with delegated permissions
authentik is an open-source identity provider. Rated critical severity (CVSS 9.0), this vulnerability is remotely exploi
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB