Summary
Fleet's deprecated Apple MDM enqueue endpoint can allow users scoped to one team to enqueue commands for enrollments outside that team. An authenticated team admin, maintainer, or GitOps user may trigger this behavior when the request includes a host UUID from their own team alongside unresolved enrollment IDs.
Affected context
The issue affects Fleet deployments where the deprecated POST /api/latest/fleet/mdm/apple/enqueue endpoint is available. It becomes a risk when team-scoped users can submit requests that combine a host UUID they are authorized to access with enrollment IDs that are not resolved or checked against the same team scope. The described behavior can reach deleted or user-channel enrollments, and the command may not be recorded in activity logs.
Exploit preconditions
- Attack surface: The deprecated Apple MDM enqueue API endpoint
- Required access: An authenticated team admin, maintainer, or GitOps role
- Trigger point: A request to enqueue an Apple MDM command, such as
InstallProfile - Request condition: The request includes a host UUID from the user's own team alongside unresolved enrollment IDs
- Why exploitation is possible: Authorization may be applied to the in-team host without adequately enforcing team scope for the other enrollment identifiers
Why this happens
The issue is an authorization bypass associated with CWE-639: Authorization Bypass Through User-Controlled Key. The endpoint's authorization behavior can rely on a user-controlled host identifier while failing to ensure that every target enrollment is resolved and authorized within the caller's team. This is an insecure object-level authorization pattern: permission to reference one in-scope object should not grant access to other targets supplied in the same request.
Potential impact
- Users may enqueue MDM commands for enrollments outside their team
- Affected devices or enrollments could receive commands that alter configuration
- Commands could reach deleted or user-channel enrollments
- Missing activity logging may reduce visibility into unauthorized command requests
General mitigation guidance
Defensive approaches typically make authorization explicit for every target object and fail closed when an identifier cannot be resolved.
Common patterns include:
- Enforce team ownership and caller permissions for each enrollment before accepting a command
- Reject unresolved, deleted, or out-of-scope targets rather than partially processing requests
- Prefer secure-by-default APIs that derive target scope from the authenticated caller instead of trusting request-supplied identifiers
- Reduce trust in client-provided object identifiers and validate them against authoritative records
- Apply least privilege to team roles and ensure command actions are limited to their intended scope
- Record authorization decisions and command-enqueue attempts in auditable logs
How teams detect issues like this
High-level detection can focus on both the endpoint's authorization logic and its runtime behavior:
- Use static analysis and code review to identify authorization checks that validate only one request identifier while processing additional targets
- Review handling of unresolved, deleted, and cross-team enrollment identifiers, including whether failures are closed by default
- Add policy checks requiring object-level authorization for every target in a batch operation
- Monitor endpoint requests for mismatches between the caller's team and the target enrollments, and compare accepted commands with MDM activity records

