CVE-2026-40172
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedauthentik 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe PATCH /api/v3/core/users/{pk}/ endpoint in authentik allows users with change_user permission on a target user to assign arbitrary groups, including groups with is_superuser=True, bypassing the stricter permission checks enforced in group-management paths. This enables privilege escalation from standard users to administrator-equivalent privileges.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check authentik versionRun 'ak version' or inspect the docker container/image tag, or check the authentik admin interface version info at /api/v3/meta/version/ or the About pageAffected if Version is before 2025.12.5 or between 2026.0.0 and 2026.2.2 (vulnerable versions)
-
Verify enable_group_superuser settingCheck authentik configuration (environment variable AUTHENTIK_AUTHENTIK__GROUP_SUPERUSER_OPERATORS or equivalent in authentik.yml) and ensure it is set to true or verify via API call to /api/v3/core/settings/ looking for enable_group_superuserAffected if enable_group_superuser is not set or is false (default vulnerable state)
-
Identify users with change_user permissionQuery the API at /api/v3/core/users/ and check which users have the change_user permission via their group memberships, or inspect group permissions in the admin interface under Users > GroupsAffected if Non-superuser accounts exist that have change_user permission on other users (potential exploiters)
-
Check for existing superuser groupsQuery the API at /api/v3/core/groups/ and inspect groups where is_superuser=True, or view Groups in the admin interface and note which groups grant superuser statusAffected if Any groups with is_superuser=True exist that could be assigned by a user with change_user permission
-
Confirm API endpoint accessibilityAttempt a limited PATCH request to /api/v3/core/users/{pk}/ with minimal data (such as setting first_name) using a test account that has change_user permission but is not a superuserAffected if The request succeeds, confirming the endpoint is reachable and the non-superuser user has sufficient permissions to attempt the bypass
A system is affected if it runs a vulnerable authentik version (pre-2025.12.5 or 2026.0-2026.2.2), has the enable_group_superuser setting disabled or unset, and contains users with change_user permission who could assign superuser groups to themselves.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to authentik version 2025.12.5 or 2026.2.3 or later to apply the fix that enforces proper permission checks when assigning groups with superuser privileges.
Upgrade to authentik version 2025.12.5 or 2026.2.3
- Identify the current authentik version in use by checking the installation or docker container version
- Review the upgrade documentation for authentik at the official documentation site
- Plan the upgrade, ensuring backups of configuration and data are created
- Upgrade to version 2025.12.5 (if on the 2025.x stable branch) or version 2026.2.3 (if on the 2026.x stable branch)
- Verify the upgrade was successful and test that the PATCH /api/v3/core/users/{pk}/ endpoint no longer allows privilege escalation via group assignment without proper enable_group_superuser permission
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation2.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,984.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-40172 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-40172 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data