/

CVE-2026-54636

Severity:

CRITICAL RISK

(9.0)

Command Injection (CWE-78) in Dokku Cron Plugin

CVE-2026-54636

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Host-Level Remote Code Execution as Dokku User

Severity:

CRITICAL RISK

(9.0)

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

A command injection vulnerability in Dokku's cron plugin allows crafted app.json cron commands with shell metacharacters to escape the Docker container boundary.

When an attacker can control these cron command definitions, they may execute arbitrary commands on the host as the Dokku user, creating a critical privilege risk.

Affected context

This vulnerability occurs in Dokku deployments that use the cron plugin to schedule tasks defined via app.json.

The risk appears when app.json cron commands are treated as shell strings and executed without sufficient sanitization or isolation, allowing shell metacharacters such as > or ; to alter the intended command.

Any environment where application owners or automated systems can modify app.json commands, and where those commands ultimately run on the host under the Dokku user, may be affected.

Exploit preconditions

  • Attack surface: Dokku application configuration, specifically the cron commands defined in app.json.
  • Required access: Ability to modify or deploy an app.json file for a Dokku application (e.g., application maintainer, CI pipeline, or compromised developer account).
  • Trigger point: Execution of the cron plugin's scheduled job, which reads and runs the configured app.json command.
  • Why exploitation is possible: The cron plugin constructs and executes shell commands derived directly from app.json input, allowing shell metacharacters to inject additional commands that run on the host as the Dokku user and bypass the container boundary.

Why this happens

The root cause aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Dokku's cron plugin treats user-controlled strings from app.json as shell commands, concatenating or passing them directly to a shell interpreter without proper escaping, validation, or use of safer APIs.

Because the shell is invoked with an unsanitized command string, metacharacters such as >, ;, &&, and similar constructs can change the execution flow, enabling additional commands to run outside the intended container scope.

Abstractly, this is an insecure pattern where configuration-driven commands are built dynamically and executed by a shell, rather than using parameterized, constrained execution primitives.

Potential impact

  • Host-level command execution as the Dokku user.
  • Modification or deletion of application data and configuration on the host.
  • Abuse of cron to establish persistence or scheduled malicious tasks.
  • Lateral movement to other containers or services using accessible credentials or sockets.
  • Interference with deployment pipelines and service availability.

General mitigation guidance

Effective mitigation focuses on limiting shell exposure and reducing trust in configuration-driven commands.

Recommended patterns include:

  • Avoid passing configuration strings directly to a shell; use APIs that execute commands with explicit argument lists and no shell parsing.
  • Constrain allowed cron commands to a fixed set of templates or whitelisted binaries and arguments, rather than arbitrary user-defined shell snippets.
  • Apply strict validation on app.json cron fields, rejecting metacharacters, redirection operators, and other shell control tokens.
  • Run cron-related processes and Dokku services with least privilege, restricting file system and network access where feasible.
  • Separate configuration-authoring responsibilities from sensitive runtime execution, and treat application configuration as potentially untrusted input.

How teams detect issues like this

Detection can rely on a mix of configuration review and code-level analysis:

  • Static analysis or linting rules that flag dynamic shell execution patterns (e.g., sh -c, system, exec with concatenated strings) within plugin code.
  • Policy-based checks in CI/CD that inspect app.json files for forbidden shell metacharacters in cron definitions.
  • Regular code reviews focused on configuration-driven execution paths, especially where user input influences OS command construction.
  • Host and container monitoring for anomalous cron activity, unexpected commands run by the Dokku user, and unusual file or process modifications.
  • Use of automated security scanners that highlight CWE-78 patterns and shell injection risks in infrastructure automation scripts and plugins.

Sources

SourceLink
github.comgithub.com/dokku/dokku/pull/8672
github.comgithub.com/dokku/dokku/security/advisories/GHSA-72vm-7pc2-x95w

Frequently asked

questions

No. The issue specifically allows breaking out of the Docker container context, enabling commands to run on the host as the Dokku user.

An attacker must be able to control or modify the app.json cron commands for a Dokku application, which may occur through application ownership, compromised developer accounts, or misconfigured automation.

The safest fix is to eliminate direct shell execution of configuration strings, instead using parameterized command execution and enforcing strict validation or whitelisting of allowed cron operations.

Treat configuration as untrusted input, avoid dynamic shell command construction, adopt least-privilege execution for automation tools, and enforce security-focused code review and static analysis for any component that turns configuration into OS-level commands.

Find out what's already
exploitable in your codebase.