All vulnerabilities

Servers and applications

CVE-2026-42200

PostgreSQL Init Script Path Traversal Leads to Arbitrary File Write and Root RCE

Severity
High 8.8
Published
2 Jul 2026
Last changed
2 Jul 2026
Added to UpHeron
22 Oct 2026
Fixed in
4.0.0-beta.474
Exploit chance
0.7% in the next 30 daysHigher than 52% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Path traversal (CWE-22)OS command injection (CWE-78)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Also known as
GHSA-mv4c-9x67-rrmv
Sources
Project advisories (GitHub)

Description

A path traversal vulnerability in Coolify's PostgreSQL database init script handling allows any authenticated user (including low-privileged members) to write arbitrary files to the host filesystem. By writing a malicious cron job to /etc/cron.d/, an attacker achieves root-level remote code execution on the server.

The generate_init_scripts() method in app/Actions/Database/StartPostgresql.php uses user-controlled filenames without path traversal validation. The validateShellSafePath() function blocks shell metacharacters but does NOT block directory traversal sequences (../).

Vulnerable Code — app/Actions/Database/StartPostgresql.php:296-311:

Missing Validation — bootstrap/helpers/shared.php:121-149:

An attacker with any authenticated account (including Member role) can:

  • Write arbitrary files to any location on the host filesystem
  • Achieve root-level remote code execution via cron job injection
  • Fully compromise the server and all hosted applications
  • Access all secrets,…
From coollabsio/coolify's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
CoolifyServers and applications · github:coollabsio/coolify
  • Every version before 4.0.0-beta.474

About Coolify

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

From its GitHub repository.
Docker Hub pulls
4,970,195Docker Hub, 15 Nov 2026
GitHub stars
66,095GitHub, 15 Nov 2026
Forks
5,989GitHub, 15 Nov 2026
Latest release
v4.7.5GitHub, 15 Nov 2026
Released
10 Nov 2026GitHub
License
Apache-2.0GitHub
First published on GitHub
25 Jan 2021GitHub

References