CVE-2026-40172 authentik: Privilege Escalation via User PATCH: Superuser Group Assignment Bypasses enable_group_superuser
Attackers with user update permissions can escalate privileges to superuser by assigning superuser groups via the user PATCH API, bypassing intended restrictions.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-40172?
CVE-2026-40172 is a high-severity vulnerability in goauthentik authentik, published on 22 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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.
Weakness: CWE-269
Which versions are affected by CVE-2026-40172?
1 open source package ship an affected version, including authentik.
| Package | Affected | Fixed in |
|---|---|---|
authentik Bitnami | All versions | 2025.12.5, 2026.2.3 |
How do I fix CVE-2026-40172?
Upgrade authentik to a fixed version for your release line: 2025.12.5 or 2026.2.3.
Is CVE-2026-40172 being exploited?
There is no known exploitation of CVE-2026-40172 in the wild and no public exploit code.
Sources
Also known as BIT-authentik-2026-40172, GHSA-h6x7-hjjc-wjc9.