Improper Privilege ManagementWeakness · CWE-269

CVE-2026-40172

HIGH · 8.1 CVSS v3.1 Published 2026-05-22
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
87/100
Remediation priority · High
Remotely reachable Zero-click

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 · unedited
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.

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 confidence

The 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.

MitigationUpgrade 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.

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 checks

Work through these to decide whether this CVE applies to you.

  1. Check authentik version
    Run '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 page
    Affected if Version is before 2025.12.5 or between 2026.0.0 and 2026.2.2 (vulnerable versions)
  2. Verify enable_group_superuser setting
    Check 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_superuser
    Affected if enable_group_superuser is not set or is false (default vulnerable state)
  3. Identify users with change_user permission
    Query 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 > Groups
    Affected if Non-superuser accounts exist that have change_user permission on other users (potential exploiters)
  4. Check for existing superuser groups
    Query 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 status
    Affected if Any groups with is_superuser=True exist that could be assigned by a user with change_user permission
  5. Confirm API endpoint accessibility
    Attempt 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 superuser
    Affected 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade 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.

Recommended fix High confidence

Upgrade to authentik version 2025.12.5 or 2026.2.3

  1. Identify the current authentik version in use by checking the installation or docker container version
  2. Review the upgrade documentation for authentik at the official documentation site
  3. Plan the upgrade, ensuring backups of configuration and data are created
  4. 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)
  5. 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
Caveat Review release notes for any breaking changes between current version and target fixed version before upgrading

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing2.0 h
  • Review / QA1.0 h
7.0 hours of engineering $1,240
Get help mitigating

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-40172 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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