Summary
A privilege escalation vulnerability in authentik allows a source-scoped SCIM provisioning token to associate a newly provisioned SCIM user with an existing local account based only on username. If the token can reach the SCIM user-ingest function, an attacker may take over ordinary accounts or superuser accounts and modify or delete them.
Affected context
The vulnerability occurs in authentik deployments that enable SCIM provisioning and use source-scoped provisioning tokens. It becomes risky when SCIM user ingestion matches accounts by username without independently verifying that the target local account belongs to the token's permitted source or scope. Accounts with elevated privileges, including superuser accounts, may therefore be exposed to operations performed through a limited provisioning credential.
Exploit preconditions
- Attack surface: The SCIM provisioning and user-ingest interface
- Required access: A valid source-scoped SCIM provisioning token with permission to provision users
- Trigger point: Creation or synchronization of a SCIM user whose username matches an existing local account
- Why exploitation is possible: Account adoption is based on username matching without adequate scope-boundary validation, allowing a limited provisioning identity to operate on an account outside its authorized scope
Why this happens
The underlying bug is an authorization-boundary failure during SCIM account reconciliation. The ingest logic treats a matching username as sufficient to associate a provisioned identity with an existing local account, but does not verify that the account is within the provisioning token's permitted source or ownership scope. This maps to CWE-269: Improper Privilege Management, because a constrained credential can cause operations to be applied to accounts with broader privileges than intended.
Potential impact
- An attacker may take over an existing local user account
- An attacker could assume control of a superuser account
- Unauthorized changes to account attributes or access settings may occur
- Accounts can be deleted or rendered unavailable
- The authentik environment may experience administrative compromise and broader unauthorized access
General mitigation guidance
Mitigation generally focuses on preserving authorization boundaries throughout identity synchronization.
Common defensive patterns include:
- Require both username matching and verified source, ownership, or immutable-identifier correlation before adopting an existing account
- Reject ambiguous identity matches rather than silently associating accounts
- Enforce token scope checks at every create, update, and delete operation
- Use least-privilege provisioning roles that cannot modify privileged or out-of-scope accounts
- Separate administrative accounts from automated provisioning namespaces
- Require additional approval or protected workflows for changes affecting privileged accounts
- Log and alert on cross-scope matches, account adoption, deletion, and privilege-sensitive updates
How teams detect issues like this
Organizations can look for this issue through:
- Static analysis and code review checks for username-only account reconciliation
- Review signals showing that external identity attributes are trusted without source, tenant, or immutable-identifier validation
- Tests that attempt cross-scope provisioning against existing accounts, including privileged accounts
- Policy enforcement requiring authorization checks before every SCIM mutation
- Monitoring for provisioning tokens modifying accounts outside their assigned source or namespace
- Alerts for unexpected superuser changes, account adoption, deletion, or ownership transitions
Automated security review tools may help identify identity-matching logic that lacks explicit authorization-boundary checks.

