CVE-2026-48742
NVD
Vulnerability Summary
Affected versions v4.1.0 (current as of 2026-05-18, commit `49656aa`). Almost certainly also vulnerable in earlier 4.x releases — the broken pattern dates back to the initial Livewire 3 migration. `4.x` is the only supported branch per `SECURITY.md`. Summary Any authenticated user on a Coolify instance can view, edit, delete, start, stop, restart, force-deploy, or change image / FQDN / public-exposure on any other team's service-application or service-database by navigating to a service URL with that other team's `service_uuid`. The `Project\Service\Index` Livewire component mounts the service via `Service::whereUuid()->first()` with no team filter, and the relevant policies (`ServicePolicy`, `ServiceApplicationPolicy`, `ServiceDatabasePolicy`) all unconditionally `return true;`. The sub-component `Project\Service\Heading` has no `authorize()` calls at all on its `start`/`stop`/`restart`/`forceDeploy`/`pullAndRestartEvent` methods. In the worst case, changing the image of a victim's service-application and triggering `pullAndRestartEvent()` causes Coolify to SSH into the victim's server and deploy an attacker-supplied container image, yielding code execution inside that container. Vulnerability details Disabled policies All policies under `app/Policies/` were converted to stubs that `return true;`. The original bodies are present as commented-out reference but are not executed. Example, `app/Policies/ServiceApplicationPolicy.php`: ```php public function update(User $user, ServiceApplication $serviceApplication): bool { // return Gate::allows('update', $serviceApplication->service); return true; } public function delete(User $user, ServiceApplication $serviceApplication): bool { // return Gate::allows('delete', $serviceApplication->service); return true; } ``` The same pattern is present in `ApplicationPolicy.php`, `ServicePolicy.php`, `ServiceDatabasePolicy.php`, `DatabasePolicy.php`, `ProjectPolicy.php`, `ServerPolicy.php`, and every other policy I checked. Inline comments call this "Authorization temporarily disabled". Authorization is therefore enforced entirely by the `Model::ownedByCurrentTeam*()` query scopes — every load of a resource by uuid MUST use one of these scopes or it has no team check. Missing scope at the Service-Index mount `app/Livewire/Project/Service/Index.php`, line 104-139: ```php public function mount() { try { $this->services = collect([]); $this->parameters = get_route_parameters(); $this->query = request()->query(); $this->currentRoute = request()->route()->getName(); $this->service = Service::whereUuid($this->parameters['service_uuid'])->first(); // <-- BUG: no team filter if (! $this->service) { return redirect()->route('dashboard'); } $this->authorize('view', $this->service); // <-- ServicePolicy::view() returns true $service = $this->service->applications()->whereUuid($this->parameters['stack_service_uuid'])->first(); if ($service) { $this->serviceApplication = $service; $this->resourceType = 'application'; $this->serviceApplication->getFilesFromServer(); $this->initializeApplicationProperties(); } else { $this->serviceDatabase = $this->service->databases()->whereUuid($this->parameters['stack_service_uuid'])->first(); // ... } $this->s3s = currentTeam()->s3s; } catch (\Throwable $e) { return handleError($e, $this); } } ``` The `project_uuid` and `environment_uuid` route parameters are captured into `$this->parameters` but never validated against the loaded service. The intended pattern is clearly visible in the sibling component `app/Livewire/Project/Service/Configuration.php` line 46-72, which is reached through the other service URL (one level up in the URL hierarchy) and uses the proper team chain: ```php public function mount() { // ... $project = currentTeam() ->projects() ->select('id', 'uuid', 'team_id') ->where('uuid', request()->route('project_uuid')) ->firstOrFail(); $environment = $project->environments() ->select('id', 'uuid', 'name', 'project_id') ->where('uuid', request()->route('environment_uuid')) ->firstOrFail(); $this->service = $environment->services()->whereUuid(request()->route('service_uuid'))->firstOrFail(); $this->authorize('view', $this->service); // ... } ``` `Service::ownedByCurrentTeam()` exists at `app/Models/Service.php:176`: ```php public static function ownedByCurrentTeam() { return Service::whereRelation('environment.project.team', 'id', currentTeam()->id)->orderBy('name'); } ``` — it just is not used in `Index::mount()`. Same bug in two other components `app/Livewire/Project/Service/DatabaseBackups.php` line 26-58: ```php public function mount() { // ... $this->service = Service::whereUuid($this->parameters['service_uuid'])->first(); // <-- same bug if (! $this->service) { return redirect()->route('dashboard'); } $this->authorize('view', $this->service); $this->serviceDatabase = $this->service->databases()->whereUuid($this->parameters['stack_service_uuid'])->first(); // ... } ``` `app/Livewire/Project/Database/Import.php` `getContainers()` line 299-309 (the `stack_service_uuid` branch — the `database_uuid` branch is fine because it uses `getResourceByUuid($uuid, $teamId)`): ```php } elseif ($stackServiceUuid) { // ServiceDatabase route - look up the service database $serviceUuid = data_get($this->parameters, 'service_uuid'); $service = Service::whereUuid($serviceUuid)->first(); // <-- same bug if (! $service) { abort(404); } $resource = $service->databases()->whereUuid($stackServiceUuid)->first(); // ... } ``` Heading sub-component has no `authorize()` at all `app/Livewire/Project/Service/Heading.php` is passed `:service="$service"` from each of the parents above (`resources/views/livewire/project/service/index.blade.php`, `database-backups.blade.php`, `configuration.blade.php`, and the shared `logs.blade.php` / `execute-container-command.blade.php`). After mount, the Livewire snapshot of `Heading` carries the (possibly cross-team) `Service` model. Its public methods do not call `$this->authorize(...)`: ```php public function start() { $activity = StartService::run($this->service, pullLatestImages: true); $this->dispatch('activityMonitor', $activity->id); } public function stop() { StopService::dispatch($this->service, false, $this->docker_cleanup); } public function restart() { / ... / } public function forceDeploy() { / ... / } public function pullAndRestartEvent() { / ... / } public function checkStatus() { / ... / } ``` Because the snapshot is signed by the server, the attacker doesn't need to forge it; they just need to drive their browser to make the standard Livewire AJAX call. The signature is on the server-supplied (cross-team) model. Affected web routes `routes/web.php` lines 257-273 (Service): ```php Route::prefix('project/{project_uuid}/environment/{environment_uuid}/service/{service_uuid}')->group(function () { // These map to Service\Configuration -- SAFE Route::get('/', ServiceConfiguration::class)->name('project.service.configuration'); Route::get('/logs', Logs::class)->name('project.service.logs'); // ... etc ... // These map to Service\Index -- VULNERABLE Route::get('/{stack_service_uuid}/backups', ServiceDatabaseBackups::class)->name('project.service.database.backups'); Route::get('/{stack_service_uuid}/import', ServiceIndex::class)->name('project.service.database.import')->middleware('can.update.resource'); Route::get('/{stack_service_uuid}/advanced', ServiceIndex::class)->name('project.service.index.advanced'); Route::get('/{stack_service_uuid}', ServiceIndex::class)->name('project.service.index'); }); ``` The `can.update.resource` middleware on the `import` route does NOT help: `app/Http/Middleware/CanUpdateResource.php` has an unconditional `return $next($request);` on line 28 followed by an entirely commented-out body. It does nothing. The outer middleware group only enforces `auth + verified` (line 106 of `routes/web.php`). Steps to reproduce Setup: two users in two separate teams on the same Coolify instance. 1. As userB (victim), create a service (e.g. WordPress or any pre-configured stack) so that there is a Service with a `service_uuid` (call it `SVC`) and an inner ServiceApplication with `stack_service_uuid` (call it `APP`). The IDs are visible in userB's browser at `/project/.../environment/.../service/SVC/APP`. 2. As userA (attacker), copy that URL into your browser, replacing only the `{project_uuid}` and `{environment_uuid}` segments with any of userA's own values (or even nonsense — they are not validated). ``` GET /project/<userA_project_uuid>/environment/<userA_env_uuid>/service/SVC/APP ``` 3. The page renders. Confirm that userA can read the victim service-application's image, FQDN, exclude_from_status, log_drain settings, etc. — these are bound into Alpine.js state. 4. Modify the FQDN field on the page, click Save. The Livewire `submitApplication` POST goes to `/livewire/update`. Server-side, `ServiceApplicationPolicy::update()` returns `true`. Victim's resource is mutated. `updateCompose()` rewrites the docker-compose file on victim's server. 5. Click the page header's "Restart" / "Force deploy" / "Pull & restart" button. `Heading::restart()` (or `forceDeploy`/`pullAndRestartEvent`) fires, no authorize call. Coolify SSHes into victim's server and runs the service with the new compose. 6. Confirm: victim's service is now running with the new fqdn (or, if the attacker changed `image` instead, with an attacker-supplied container). 7. As userA, click "Danger" -> "Delete" on the page. Enter userA's own password. `deleteApplication($attackerPassword)` runs, `verifyPasswordConfirmation($password, $this)` validates userA's password, `$this->serviceApplication->delete()` deletes victim's resource. The simplest reproducer (no image change) is the delete: it leaves audit evidence on the victim side ("resource deleted") with attacker's user id as the actor but the victim's resource gone. Impact - Confidentiality: attacker reads victim's service configuration, container env (via the Index page), FQDNs, exclude-from-status, image tags, log-drain state, etc. - Integrity: attacker mutates victim's service-application or service-database (FQDN, image, public-port, exclude-from-status, log-drain), regenerating the on-server compose file. - Availability: attacker calls `Heading::stop()` to take down victim's production service, or `deleteApplication` to remove it permanently. - Privilege escalation / code execution: attacker changes the `image` field to an attacker-controlled image, calls `Heading::pullAndRestartEvent()`. Coolify pulls and runs the attacker-supplied image on victim's server. From inside the container, the attacker has whatever access Coolify normally gives that service — for typical services that includes a writable filesystem, network access to other team resources on the same server, and (often) access to mounted volumes containing application data. Severity (proposed) CVSS 3.1 / 4.0: 8.0 - 8.7 (High). Vector AV:N / AC:L (low for delete/stop, high for full image-swap RCE) / PR:L / UI:N / S:C / C:H / I:H / A:H. Eligible for the GHSA PVR program (>= 7.0 threshold). Even excluding the image-swap RCE path, the cross-team delete + stop alone is CVSS 7.x. Knowledge requirement The exploit needs the victim's `service_uuid` + `stack_service_uuid` (24-char Cuid2 each). These are not random-guessable but they are also not treated as secrets: they appear in admin browser URLs, screenshots in support tickets, audit logs, shared bug reports, and any other artifact where a Coolify admin shares a URL. There is no rate limiting on Livewire endpoints that would let an enumeration attacker discover them, but a targeted attacker who knows even one victim service URL has full cross-team control. Suggested fix 1. Short-term (minimum patch): Replace `Service::whereUuid(...)` with `Service::ownedByCurrentTeam()->where('uuid', ...)` in: - `app/Livewire/Project/Service/Index.php` line 111 - `app/Livewire/Project/Service/DatabaseBackups.php` line 31 - `app/Livewire/Project/Database/Import.php` line 302 2. Add `authorize` calls on every public method of `app/Livewire/Project/Service/Heading.php` (`start`, `stop`, `restart`, `forceDeploy`, `pullAndRestartEvent`, `checkStatus`, `manualCheckStatus`). Even better, re-check ownership in `mount()` since the snapshot can be re-hydrated. 3. Medium-term: re-enable the commented-out bodies in `app/Policies/*.php` and revert `app/Http/Middleware/CanUpdateResource.php` to actually enforce `Gate::allows`. The "Authorization temporarily disabled" comment has been in the code since the policy classes were introduced; removing the temporary stubs is the correct correction. 4. Long-term hardening: add a `team_id` global scope on `Application`, `Service`, `ServiceApplication`, `ServiceDatabase`, `Server`, `Project`, `Environment`, `StandaloneXxx` models keyed on `currentTeam()` (with an explicit `withoutGlobalScope` for the few job/console paths that legitimately need cross-team access). This converts "every query needs scoping" from a manual checklist into a default-on invariant. The current pattern is fragile — the three components above are the third such IDOR class found in 12 months and the tests for IDOR (`tests/Feature/CrossTeamIdor*Test.php`) explicitly do not cover Livewire service components. 5. Add regression tests for the three components: equivalents of `tests/Feature/CrossTeamIdorServerProjectTest.php` for `App\Livewire\Project\Service\Index`, `App\Livewire\Project\Service\DatabaseBackups`, and `App\Livewire\Project\Service\Heading`. Tested against - Source: `https://github.com/coollabsio/coolify` branch `v4.x`, commit `49656aa`, tag `v4.1.0`, released 2026-05-18. - Code-path analysis only; live reproduction not performed against a deployed instance. Disclosure timeline - 2026-05-18: Discovered, reported via GHSA PVR. Reporter Louis Sanchez @ Voke Cyber
CVSS v3.1 Base Metrics — Score 8.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HAttack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh
Affected & Patched Versions
- coollabsio/coolify >= 4.0.0, < 4.1.1
- coollabsio/coolify 4.1.1
What to do
Plan remediation soon. No exploitation is confirmed yet, but the severity is high.
- Check whether you run coollabsio/coolify and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Dec 1, 2026Published
- Dec 1, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new coollabsio/coolify CVEsYou are reading CVE-2026-48742. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Dec 1, 2026 23:01 UTC