CVE-2026-48738: coollabsio/coolify Auth Bypass

CVE-2026-48738

NVD

Vulnerability Summary

Summary A cross-tenant authorization bypass in `Project\New\GithubPrivateRepository` Livewire allows any authenticated user on a multi-team Coolify instance to mint a valid, short-lived GitHub App installation token (`ghs_*`) for any GitHub App registered on the instance, regardless of which team owns it. The token is signed with the victim team's stored GitHub App RSA private key and is accepted by `api.github.com` as the victim team's GitHub App — yielding read (and, where the App has `contents: write`, write) access to every private repository the App can see, plus enumeration of the victim team's full private-repo list. Details `Project\New\GithubPrivateRepository::loadRepositories($github_app_id)` accepts an arbitrary integer from the client and resolves it via `GithubApp::where('id', $github_app_id)->first()` with no team scope. It then calls `generateGithubInstallationToken($this->github_app)` — which signs a JWT with the victim team's stored RSA PEM and exchanges it at `api.github.com/app/installations/<id>/access_tokens` for a real `ghs_*` installation token — and assigns the result to the public Livewire property `$this->token`. Because `$token` is `public`, Livewire returns it to the attacker in the response payload. The same call also populates `$this->repositories` with the victim team's full private-repository list. The sibling helper `GithubApp::ownedByCurrentTeam()` exists at `app/Models/GithubApp.php:68-74` and is already used by other callers — it is simply not invoked here. Affected component: - `app/Livewire/Project/New/GithubPrivateRepository.php` - `public string $token` — line 40 (public, not `#[Locked]`, returned to client) - `loadRepositories($github_app_id)` — lines 99–124 ```php public string $token; // public — returned to client in Livewire payload public function loadRepositories($github_app_id) { // ... $this->selected_github_app_id = $github_app_id; $this->github_app = GithubApp::where('id', $github_app_id)->first(); // no team scope $this->token = generateGithubInstallationToken($this->github_app); // mints ghs_* with victim team's RSA PEM $repositories = loadRepositoryByPage($this->github_app, $this->token, $this->page); // ... } ``` Once minted, the token is a fully valid GitHub App installation credential with GitHub's default ~1-hour installation-token TTL (the intermediate signing JWT Coolify constructs is separately capped at +8 minutes by `bootstrap/helpers/github.php:41`, but that is only the JWT used to exchange for the installation token — the resulting `ghs_*` is the one returned to the attacker and lives for ~1 hour on GitHub's side). Per-token revocation is not possible — only rotating the GitHub App's RSA private key (re-key from the GitHub UI) invalidates a leaked token before its TTL. PoC 1. Sign in as any user on a Coolify instance that hosts at least one other team with a fully-installed GitHub App. 2. Create an empty project, then open `/project/<uuid>/<env>/new?type=private-gh-app&destination=<attacker_own_dest>` to mount the `project.new.github-private-repository` Livewire component. The `destination=<attacker_own_dest>` query string is required — without it the parent `project.new.create` page redirects and the `github-private-repository` Livewire component never mounts. The attacker's own `github_apps` dropdown can be empty — the vulnerable handler does not require the App to appear in the attacker's dropdown. 3. In the browser console: ```js const c = window.Livewire.all().find(x => x.name === 'project.new.github-private-repository'); await c.$wire.loadRepositories(<target_github_app_id>); // foreign team's GithubApp.id console.log(c.$wire.token); // ghs_*... — real GitHub installation token console.log(c.$wire.repositories); // victim team's private repository list ``` 4. The Livewire response payload contains `token: "ghs_..."` (length 40) and the victim team's private repository list. The token authenticates as the victim team's GitHub App against `api.github.com` directly — no further Coolify involvement is needed. Live-confirmed on 2026-05-17 against a dev instance running code byte-identical to v4.0.0 (commit `922950de5` on the `docker-local-prod-parity` branch; the v4.1.0 tag was cut on 2026-05-18). From an account that was not a member of the target team, `loadRepositories(1)` returned a real `ghs_*` token and a list of private repositories from the foreign org. The token was captured in memory only; the local copy was deleted after the probe. Re-verified against the v4.1.0 source tree in the consolidated audit on 2026-05-19; no code changes to the affected method between the live confirmation and the consolidated review. Impact Cross-team authorization bypass. Affects any Coolify deployment that hosts a GitHub App for any team. Any authenticated user — including a freshly-registered account on any instance where `is_registration_enabled` is on — can exploit it. Resulting capability for the attacker: - Mint a usable, real GitHub App installation token for any GitHub App registered on the Coolify instance. - Enumerate and clone every private repository the victim team's GitHub App can see. - Where the App was installed with `contents: write` scope: push to victim repositories as the App (e.g. malicious commits to `main`, tampering with CI workflows, publishing tags). - Where the App has additional scopes (e.g. `pull_requests: write`, `actions: write`, `secrets: read`): the corresponding GitHub-side write or read operations. The blast radius is bounded only by the scopes the victim granted when installing the GitHub App, not by anything Coolify enforces. The damage persists on GitHub even if the Coolify instance is taken offline immediately, because the token is valid until it expires (~1 hour) or until the App's RSA PEM is rotated. Remediation Replace the unscoped lookup with a strict team-scoped query, and stop returning the minted token to the client: ```php public function loadRepositories($github_app_id) { $this->github_app = GithubApp::where('team_id', currentTeam()->id) ->findOrFail($github_app_id); $token = generateGithubInstallationToken($this->github_app); // local only — do not assign to public property $repositories = loadRepositoryByPage($this->github_app, $token, $this->page); // ... } ``` Note on `GithubApp::ownedByCurrentTeam()`: the existing scope helper at `app/Models/GithubApp.php:68-74` returns `team_id == currentTeam() OR is_system_wide == true`. Using it here would re-introduce a partial bypass: any operator who has marked a GitHub App `is_system_wide` (e.g. a shared "company" App) would allow every team on the instance to mint that App's installation token. For this method specifically, use the stricter `where('team_id', ...)` form shown above — or, separately, gate the ability to mark Apps `is_system_wide` behind the instance-admin role and audit existing `is_system_wide=true` rows on upgrade. Additional hardening: - Declare `$token` as `protected` (or remove it from the component state entirely) so it is never serialized into the Livewire payload. - Mark `$selected_github_app_id` as `#[Locked]` once the parent dropdown reliably constrains it to team-owned Apps. Regression test: assert that a member of team A cannot pass team B's `github_app_id` to `loadRepositories()` — the call must reject with 403/404 and must not populate `$token` or `$repositories`. Operator action required on currently-vulnerable instances: rotate the GitHub App's RSA private key (re-key from `github.com/settings/apps/<your-app>`) regardless of patch timing. The token mint is not logged by Coolify and is indistinguishable on the GitHub side from legitimate Coolify activity, so any vulnerable v4.0.0–v4.1.0 instance with open registration (`InstanceSettings.is_registration_enabled = true`) and at least one additional team beyond the operator's own must be treated as having a potentially-leaked App credential. (Strict single-team instances are not exposed to this finding, because no foreign `github_app_id` exists for an attacker to pass.)
Severity Level
HIGH(8.5)
Published Date
Dec 1, 2026
Last Modified
Dec 1, 2026
Exploitation Status
No confirmed exploitation yet
CVE Record Status
Reserved
This CVE ID is referenced in a public advisory, but the CVE Program has not published its official CVE Record yet. Full CVSS/CPE data from NVD will appear here once it does.
Root Weakness (CWE)
The system does not prevent one user from accessing another user data or record by modifying the key value identifying the data.
The software does not perform an authorization check when an actor attempts to access a resource or perform an action.
CVSS v3.1 Base Metrics — Score 8.5
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeChanged
ConfidentialityHigh
IntegrityLow
AvailabilityNone

Affected & Patched Versions

Affected Versions
  • coollabsio/coolify >= 4.0.0, < 4.1.1
Patched Versions
  • coollabsio/coolify 4.1.1

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is high.

  1. Check whether you run coollabsio/coolify and which version.
  2. 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-48738. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Dec 1, 2026 23:01 UTC