# GHSA-PVHJ-67PR-J36P: cipi/gui 4.1.1: client-writable Livewire $can map lets a view-only panel user act as admin on any app

- Database: GitHub
- Severity: CVSS 8.8 (High)
- Published: 2026-11-16
- Modified: 2026-11-16

## Affected versions

- cipi/gui (Packagist): through 4.1.1

## Description

**Disclosure of AI use.** This report was researched and drafted with the assistance of an AI coding agent (Claude Code), operated by me; I am responsible for its content. The agent performed the source review of cipi/gui 4.1.1, wrote the PHPUnit proof-of-concept, and ran it locally against the published Composer package (Orchestra Testbench + Http::fake; no Cipi host was contacted). Every measured line in the reproduction section is actual command output (see run_or.log: 3 tests, 16 assertions, OK), not predicted, and the PoC is available on request so you can re-run it independently.

Reporting against cipi/gui 4.1.1 (cipi-sh/gui, commit 6e7df4c). gui has no SECURITY.md of its own and the cipi SECURITY.md routes related projects here.

In cipi/gui 4.1.1 a panel user granted only `view` on a single app can read any app's secrets, delete apps, and run Artisan on any app on that server, acting with the panel's own admin token.

AppDetail computes the caller's abilities once in mount() and keeps them in a public Livewire property with no #[Locked]:

    // src/Livewire/AppDetail.php:48
    public array $can = [];
    // :285 (mount only)
    $this->can = Access::appAbilityMap($this->panelUser(), (int) ($this->serverId ?? 0), $this->appName);
    // :2034 - the only gate for every action
    protected function allowed(string $ability): bool { if ($this->can[$ability] ?? false) { return true; } ... }

Livewire applies the client's `updates` to every public property that is not #[Locked] (HandleComponents::updateProperty; only BaseLocked throws). $appName (:35) is public too. So a user with only `view` on one app can post the component's real snapshot with:

    "updates": {"can": {"view":true,"deploy":true,"edit":true,"env":true,"logs":true,"run":true,"delete":true},
                "appName": "<any other app on a server they can see>"}

and then call any action. The panel performs it with its own server API token: read/write .env (APP_KEY, DB passwords), runArtisan (PHP execution), change repo/branch (next deploy runs attacker code), delete apps, rotate the webhook secret.

Repro (local lab, published package, no live host): a PHPUnit test logs in as a user with only `view` on `shop`, takes the genuine wire:snapshot from GET /apps/shop and posts it to the Livewire update URI with the updates above and calls [loadEnv, deleteApp, runArtisan]. Response 200; the panel then sends GET /api/apps/blog/env, DELETE /api/apps/blog and POST /api/apps/blog/artisan with Authorization: Bearer <panel token>, for an app the user holds no grant on. The control run (same user, no tampering) is refused, matching your own PermissionsTest.

Same pattern in Concerns/ManagesAsyncJobs.php: $activeJobId is public, so posting another job id + pollJob makes the panel fetch that job's output (which can contain one-time DB/SSH passwords); this one needs the job UUID.

Not by design: README and PermissionsTest treat `can` as the boundary, and ServerManage/Databases/Apps re-check serverAllowed() inside each action.

Fix: re-check Access::can(auth()->user(), $ability, $serverId, $appName) inside each action (re-validating appName), or mark $can, $appName, $activeJobId, $jobRunning as #[Locked] and re-derive them per request.

Requires an authenticated non-admin panel account with at least `view` on one app; not reachable unauthenticated. Reproduced with cipi/gui 4.1.1 and Livewire 4.4.8 via testbench + Http::fake; no Cipi host was contacted. Full PHPUnit PoC available on request.

CVSS 3.1 8.8 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

Best,
kta1kri
https://github.com/kta1kri

## References

- https://github.com/cipi-sh/cipi/security/advisories/GHSA-pvhj-67pr-j36p

Page: https://cve.now/GHSA-PVHJ-67PR-J36P

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
