Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-34038 — CVE-2026-34038: Authenticated Remote Command Injection in Coolify | Kitploit
Tools/GitHubGitHub/themehackers/cve-2026-34038
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPapers & ResearchLearning & Education
GitHubthemehackers/cve-2026-34038

CVE-2026-34038

CVE-2026-34038: Authenticated Remote Command Injection in Coolify

View Repository
1304 months agoNot yet reviewed
Share

CVE-2026-34038: Authenticated Remote Command Injection in Coolify

This repository contains documentation and analysis for CVE-2026-34038, a critical command injection vulnerability in Coolify.

Summary

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 (e.g., database credentials, API keys) via deployment logs, even if the build environment isolates the Docker socket.

  • Vulnerability Type: CWE-78 (OS Command Injection)
  • Severity: Critical (CVSS 10.0)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Prerequisites & Limitations

  • Minimum Required Permissions: write (to update configuration) and read:sensitive (to read exfiltrated data via logs).
  • Bypass: A mechanism exists allowing tokens without explicit deploy permissions to trigger builds.
  • Attack Surface: The overall attack surface is larger than initially estimated since administrative/root privileges are not required.

Technical Details

1. dockerfile_location Injection

File: app/Jobs/ApplicationDeploymentJob.php

Input lacks proper shell escaping or input validation, permitting direct command injection using metacharacters like ;, &&, and pipes.

// Lines 2976-2978: Traditional build with args
$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}"
);

// Lines 526: Also used in simple dockerfile deployment
executeInDocker($this->deployment_uuid, "echo '$dockerfile_base64' | base64 -d | tee {$this->workdir}{$this->dockerfile_location} > /dev/null"),

2. pre_deployment_command Execution

File: app/Jobs/ApplicationDeploymentJob.php (Lines 3882-3909)

While basic escaping is performed, the function naturally runs native shell commands, making it possible to dump data straight into build logs.

private function run_pre_deployment_command()
{
    if (empty($this->application->pre_deployment_command)) {
        return;
    }
    // ...
    $cmd = "sh -c '".str_replace("'", "'\\''", $this->application->pre_deployment_command)."'";
    $exec = "docker exec {$containerName} {$cmd}";
    $this->execute_remote_command(
        [
            'command' => $exec,
            'hidden' => true,
        ],
    );
}

Remediation

1. Sanitize dockerfile_location Input (in ApplicationDeploymentJob.php):

Validate the input using strict regular expressions and escape the shell argument:

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);
}

2. API-Level Validation (bootstrap/helpers/api.php):

'dockerfile_location' => [
    'string',
    'nullable',
    'regex:/^[a-zA-Z0-9._\-\/]+$/',
    'max:255'
],

3. Other Guidelines:

  • Enforce strict allowlists blocking shell metacharacters.
  • Fix the deployment permission bypass logic.
  • Audit equivalent fields such as docker_compose_location.

References & Credits

  • Reporter / Credits: ThemeHackers
  • Official Advisory: GitHub Security Advisory (GHSA-qqrq-r9h4-x6wp)
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    385
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    279

Explore all tools

Browse our collection of tools

View all tools →