Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2026-34038 — CVE-2026-34038: Coolifyにおける認証済みリモートコマンドインジェクション | Kitploit
ツール/GitHubGitHub/themehackers/cve-2026-34038
脆弱性分析コード分析エクスプロイトウェブアプリケーション悪用論文と研究学習と教育
GitHubthemehackers/cve-2026-34038

CVE-2026-34038

CVE-2026-34038: Coolifyにおける認証済みリモートコマンドインジェクション

リポジトリを見る
11ヶ月前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2026-34038: Coolify における認証済みリモートコマンドインジェクション

このリポジトリは、Coolify の重大なコマンドインジェクション脆弱性 CVE-2026-34038 に関するドキュメントと分析を提供します。

概要

Coolify における認証済みリモートコマンドインジェクション脆弱性 (CWE-78) により、アプリケーションの "write" 権限を持つユーザーが、ビルド環境が Docker ソケットを分離している場合でも、デプロイメントログを介して リモートコード実行 (RCE) を達成し、機密環境変数 (例: データベース認証情報、API キー) を 流出 させることが可能です。

  • 脆弱性タイプ: CWE-78 (OS コマンドインジェクション)
  • 深刻度: 重大 (CVSS 10.0)
  • ベクター: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

前提条件と制限事項

  • 最低限必要な権限: write (設定を更新するため) および read:sensitive (ログを介して流出データを読み取るため)
  • 回避策: 明示的な deploy 権限を持たないトークンがビルドをトリガーできる仕組みが存在します。
  • 攻撃対象領域: 管理者/root 権限が必要ないため、全体的な攻撃対象領域は当初の推定よりも大きくなります。

技術的詳細

1. dockerfile_location インジェクション

ファイル: app/Jobs/ApplicationDeploymentJob.php

入力には適切なシェルエスケープや入力検証が欠けており、;、&&、パイプなどのメタ文字を使用した直接的なコマンドインジェクションが可能です。

root@kitploit:~
// 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 の実行

ファイル: app/Jobs/ApplicationDeploymentJob.php (3882-3909 行)

基本的なエスケープは行われていますが、この関数はネイティブなシェルコマンドを実行するため、データをビルドログに直接書き込むことが可能です。

root@kitploit:~
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,
        ],
    );
}

修正策

1. dockerfile_location 入力のサニタイズ (ApplicationDeploymentJob.php 内):

厳密な正規表現を使用して入力を検証し、シェル引数をエスケープします:

root@kitploit:~
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 レベルの検証 (bootstrap/helpers/api.php):

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

3. その他のガイドライン:

  • シェルメタ文字をブロックする厳格な許可リストを適用する。
  • デプロイ権限のバイパスロジックを修正する。
  • docker_compose_location などの同等のフィールドを監査する。

参照とクレジット

  • 報告者 / クレジット: ThemeHackers
  • 公式アドバイザリ: GitHub Security Advisory (GHSA-qqrq-r9h4-x6wp)
ツールをダウンロード