Summary
A cross-tenant authorization flaw in Coolify's cloneTo() action allows authenticated users to clone resources into destinations owned by other teams.
Because destination resources are resolved without tenant scoping, users may access or influence resources across team boundaries in multi-tenant deployments.
Affected context
This vulnerability appears in multi-tenant Coolify deployments where resources and destinations are owned by distinct teams.
The issue manifests during resource cloning operations using the Livewire cloneTo() action in ResourceOperations.php.
The source resource is checked for authorization, but destination resources are fetched using unscoped Eloquent queries, bypassing tenant ownership constraints and allowing cross-team interactions under certain configurations.
Exploit preconditions
- Attack surface: Web interface or API endpoints invoking the cloneTo() Livewire action
- Required access: Authenticated user account with permission to clone at least one resource under their own team
- Trigger point: Initiating a clone operation and specifying a destination identifier corresponding to another team's resource or destination
- Why exploitation is possible: Destination resources are resolved through unscoped Eloquent lookups that do not enforce team or tenant ownership, leading to insecure direct object references and improper access control across tenants
Why this happens
The core issue is an authorization gap where ownership checks are applied only to the source resource but not consistently enforced on destination resources.
In ResourceOperations.php, the cloneTo() Livewire action uses unscoped Eloquent queries to resolve destination resources by identifier, effectively trusting user-supplied IDs.
This pattern matches CWE-639: Insecure Direct Object Reference, where application-level access control is insufficient to ensure that the user is entitled to act on the referenced object, particularly in multi-tenant architectures requiring strict tenant scoping.
Potential impact
- Authenticated users may clone resources into destinations owned by other teams
- Tenants could gain visibility into or indirect access to cross-tenant resources and configurations
- Unauthorized influence over other teams' infrastructure definitions or deployment targets
- Potential data exposure or environment misconfiguration due to cross-tenant resource operations
General mitigation guidance
Mitigation typically focuses on enforcing consistent, tenant-aware authorization for all objects involved in a resource operation.
Common defensive patterns include:
- Applying ownership and tenant scoping checks to both source and destination resources before performing clone or move operations
- Using query scopes or policies that automatically restrict Eloquent lookups to the current user's team or tenant context
- Centralizing authorization logic in well-audited policies or guards rather than duplicating checks in individual actions
- Designing multi-tenant APIs so that resource identifiers cannot be used across tenant boundaries without explicit, validated relationships
These patterns help ensure that every referenced object in an operation is protected by the same access control rules.
How teams detect issues like this
Organizations can detect similar access control weaknesses by:
- Reviewing controller, Livewire, and service-layer actions for ID-based lookups that bypass authorization policies or tenant scopes
- Employing static analysis rules that flag unscoped Eloquent queries in multi-tenant contexts or highlight direct use of user-supplied IDs
- Implementing code review checklists that require verification of ownership checks on both source and destination objects in state-changing operations
- Running integration tests that attempt cross-tenant operations (clone, move, delete, update) using accounts from different teams to confirm that access is denied
Automated security testing and policy enforcement can supplement manual review to catch future instances of insecure direct object references.

