/

CVE-2026-58165

Severity:

HIGH RISK

(8.8)

Authorization Flaw (CWE-862) in OpenZiti Enrollment

CVE-2026-58165

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Privilege Escalation to Administrative Control

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenZiti through 2.0.0 contains an authorization flaw in its enrollment management logic that lets certain authenticated non-admin identities create enrollments for arbitrary identities, including the default administrator.

By redeeming the resulting one-time enrollment token via the unauthenticated client API, an attacker can obtain a client certificate that impersonates a targeted administrative identity, potentially gaining full control over the controller and overlay.

Affected context

This vulnerability arises in OpenZiti controllers where non-admin identities are granted fine-grained permissions to manage enrollments.

The issue is present when the enrollment manager logic verifies only that a target identity exists, without confirming that the caller is authorized to act on behalf of that identity.

It is most relevant in deployments that rely on delegated enrollment management or custom role configurations that allow non-admin users to create or manipulate enrollments.

Exploit preconditions

  • Attack surface: Controller-side enrollment management and client enrollment API.
  • Required access: Authenticated non-admin identity with permissions to create or manage enrollments.
  • Trigger point: Invocation of the ApplyCreate function in controller/model/enrollment_manager.go to create an enrollment for a chosen target identity.
  • Why exploitation is possible: The code verifies only that the target identity exists but omits authorization checks binding the caller's identity to the target identity, allowing enrollment creation for arbitrary identities including administrators. The resulting one-time token can then be redeemed via an unauthenticated enrollment endpoint.

Why this happens

The underlying bug is a missing authorization check in the enrollment creation workflow, mapping directly to CWE-862: Missing Authorization.

The ApplyCreate function validates the existence of the target identity but does not enforce any policy that restricts which identities a caller may enroll.

As a result, an identity with enrollment management rights can create enrollment tokens for accounts it should not control, breaking the intended separation of privileges and enabling elevation to administrative roles via certificate-based impersonation.

Potential impact

  • Attackers may obtain client certificates that authenticate as administrative identities.
  • Controllers could be fully administered by unauthorized actors, including configuration changes and overlay management.
  • Zero-trust overlay policies and routing may be modified or disabled.
  • Sensitive overlay traffic and secrets managed by the controller could be exposed or manipulated.
  • Further compromise of connected services and infrastructure may occur through misuse of admin capabilities.

General mitigation guidance

Mitigation typically focuses on tightening authorization boundaries around enrollment operations and certificate issuance.

Common defensive patterns include:

  • Enforcing strict authorization checks that bind enrollment actions to the caller's identity, ensuring they can only enroll themselves or explicitly delegated identities.
  • Designing APIs so that tokens and certificates can only be created through flows that require proof-of-possession and confirmation of intended identity.
  • Minimizing and carefully scoping permissions related to enrollment management, avoiding broad rights for non-admin users.
  • Applying least-privilege principles to controller roles and identities, and routinely reviewing role assignments for overbroad access.
  • Implementing defense-in-depth checks, such as policy rules that restrict creation of enrollments for high-privilege identities.

How teams detect issues like this

High-level detection approaches for this class of issue include:

  • Static analysis or code review focused on authorization-critical functions, looking for operations that validate existence of resources but omit explicit permission checks.
  • Security-focused reviews of controller APIs to ensure that identity-binding logic is consistently applied around enrollment and token issuance.
  • Audit logging and monitoring of enrollment creation events, especially those targeting administrative or high-privilege identities, with alerts for anomalous patterns.
  • Policy enforcement in CI/CD pipelines that flag changes to access control logic, role definitions, or enrollment-related code paths for manual review.
  • Periodic access reviews and role audits to identify non-admin identities with unexpectedly broad enrollment management capabilities.

Sources

SourceLink
github.comgithub.com/openziti/ziti/commit/3027fdffd3e57884487b7c46e5e669cfbc8becdf
github.comgithub.com/openziti/ziti/issues/4010
github.comgithub.com/openziti/ziti/pull/4013
vulncheck.comvulncheck.com/advisories/openziti-privilege-escalation-to-admin-via-unauthorized-enrollment-creation

Frequently asked

questions

Exploitation is limited to environments where non-admin identities have enrollment management permissions. Within those contexts, attackers who control such identities can escalate to administrative control by creating enrollments for high-privilege accounts.

The attacker must already have an authenticated identity in the OpenZiti controller with fine-grained permissions to create or manage enrollments. No special network access beyond reaching the controller and client enrollment APIs is required.

The safest fix is to enforce strong authorization checks on all enrollment creation paths, ensuring that callers can only create enrollments for themselves or explicitly permitted identities. This should be combined with careful role design so that enrollment management privileges are narrowly scoped.

Prevention involves treating enrollment and certificate issuance as high-risk operations, consistently binding them to verified caller identities, applying least-privilege access control, and subjecting any changes to access control or enrollment workflows to security-focused design and code review.

Find out what's already
exploitable in your codebase.