/

CVE-2026-45633

Severity:

CRITICAL RISK

(9.9)

OS Command Injection in Dokploy /docker-container-logs

CVE-2026-45633

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Authenticated Remote Code Execution as root

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Dokploy versions 0.26.6 and earlier contain an OS command injection vulnerability in the /docker-container-logs WebSocket endpoint, where user-supplied tail and since parameters are concatenated directly into shell commands.

An authenticated user who can access this endpoint may be able to execute arbitrary commands with root privileges on the host system where Dokploy runs.

Affected context

This vulnerability affects Dokploy deployments that expose the /docker-container-logs WebSocket API for retrieving container logs.

The risk is present when:

  • The backend constructs shell commands to fetch logs (e.g., via docker logs) and
  • The tail and since parameters from authenticated clients are inserted into those shell commands without strict validation, escaping, or parameterization.

Any environment where Dokploy runs with elevated privileges (such as root) increases the severity of potential compromise.

Exploit preconditions

  • Attack surface: Network-accessible Dokploy instance exposing the /docker-container-logs WebSocket endpoint.
  • Required access: Valid authenticated user account or any credentials sufficient to invoke the logs WebSocket endpoint.
  • Trigger point: Supplying crafted values in the tail and/or since query or message parameters that are incorporated into a shell command.
  • Why exploitation is possible: The application builds shell commands by concatenating raw parameter values without validation, quoting, or use of a safer API, allowing shell metacharacters to break out of the intended command context and run arbitrary commands.

Why this happens

The core issue is reliance on string-based shell command construction using untrusted input fields (tail and since) in the /docker-container-logs WebSocket endpoint.

Instead of treating these fields as data and constraining them to numeric or well-defined formats, Dokploy directly appends them to command strings that are executed by a shell.

This pattern maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, where attackers can inject shell metacharacters or additional commands because no rigorous input validation, escaping, or parameterization is applied.

Potential impact

  • Execution of arbitrary commands with root privileges on the Dokploy host.
  • Complete compromise of the underlying server, including installing backdoors or modifying system configuration.
  • Access to or manipulation of other containers and workloads managed by Dokploy.
  • Unauthorized access to sensitive configuration secrets, environment variables, and data volumes.
  • Use of the compromised server as a pivot point for lateral movement within the infrastructure.

General mitigation guidance

Mitigation generally focuses on eliminating direct shell command construction and constraining input:

  • Replace shell-based invocations with library or API calls (e.g., Docker SDKs) that treat parameters as data rather than shell fragments.
  • Enforce strict typing and bounds for parameters such as tail and since (e.g., integers or well-validated duration formats) and reject anything that does not conform.
  • Avoid passing user input through a shell; if process execution is necessary, use exec-style APIs with argument arrays rather than single concatenated command strings.
  • Apply least-privilege principles so the Dokploy process does not run as root where possible, reducing the blast radius of any exploitation.
  • Implement centralized input validation and normalization for all logging and diagnostic endpoints to avoid similar bugs in related code paths.

How teams detect issues like this

Effective detection often combines code-level and runtime perspectives:

  • Static analysis: Configure rules to flag use of shell execution functions (e.g., exec, system, spawn with shell: true) where untrusted input variables flow directly into the command string.
  • Code review: Look for log or diagnostic endpoints that construct commands from request parameters; pay attention to concatenation patterns, string interpolation, and missing validation or type checks.
  • Security testing: Include web and WebSocket endpoints in dynamic application security testing, focusing on sending crafted parameter values to identify command injection behavior.
  • Runtime monitoring: Monitor for unusual command executions by the Dokploy process (e.g., unexpected binaries, network tools) via host-based intrusion detection or audit logs, and alert on anomalous activity patterns.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-wmqj-wr9q-327p

Frequently asked

questions

Yes. It is remotely exploitable over the network, but it requires an authenticated user who can access the /docker-container-logs WebSocket endpoint and supply crafted parameter values.

Not necessarily. Any authenticated role that can invoke the affected endpoint with controllable tail and since parameters could potentially exploit the issue, depending on how authorization is configured.

The safest approach is to remove dependence on shell-based command construction for log retrieval and instead use parameterized, library-level APIs. Inputs should be strongly typed (e.g., integer-only for tail) and validated against strict allowlists, with all execution done via APIs that do not interpret shell metacharacters.

Adopt a defensive coding standard that bans string-concatenated shell commands with user input, enforce centralized validation for all request parameters, and integrate static analysis and security reviews into the development pipeline to catch command injection patterns early.

Find out what's already
exploitable in your codebase.