CVE-2026-45408

Dokku: OS Command Injection via App Name in Git Pre-Receive Hook

Published Jun 26, 2026 CVSS 3.1 · 9 Critical EPSS < 1% KEV · Not listed
Description
Dokku is a docker-powered PaaS. Prior to 0.38.2, the app name validation regex (^[a-z0-9][^/:_A-Z]*$) permits shell metacharacters. When an authenticated user pushes to a git remote with a crafted app name, the name is embedded unquoted into a bash pre-receive hook script via an unquoted heredoc (<<EOF instead of <<'EOF') in fn-git-create-hook() at plugins/git/internal-functions:378. On git push, bash interprets the semicolon as a command separator, executing arbitrary commands as the dokku user. This vulnerability is fixed in 0.38.2.

Analysis

AI-generated

Technical impact

Dokku is a Docker‑based Platform as a Service that deploys applications via git pushes. A flaw in the application name validation regex allows shell metacharacters to enter the name unquoted. On a push, Dokku writes the app name into a bash pre‑receive hook using a non‑quoted heredoc. Bash then interprets shell metacharacters such as a semicolon as command separators, enabling an attacker who can push to the repository to execute arbitrary commands as the dokku user. This is an operating‑system command injection (CWE‑78) that can compromise the confidentiality, integrity, and availability of the entire Dokku host.

Affected Systems

Versions of Dokku older than 0.38.2 are affected. The issue resides in the dokku:dokku product and touches any instance that uses the default git pre‑receive hook. Any deployment that has not yet applied the 0.38.2 update remains vulnerable.

Risk and Exploitability

The vulnerability has a CVSS score of 9, classifying it as critical. Although no EPSS score is available and it is not listed in CISA KEV, the exploitation probability is uncertain; however the lack of a KEV listing does not preclude real-world attacks. The attack vector requires authenticated git push access, so it is limited to users who are allowed to deploy. The exploit path is straightforward: push a repository with an app name containing a shell metacharacter; the pre‑receive hook runs the embedded command, granting the attacker execution as dokku.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Dokku installation to version 0.38.2 or later, which replaces the vulnerable regex and quotes the app name when inserting it into the hook script.
  • If an upgrade cannot be performed immediately, restrict git push permissions to trusted users only or remove push access for users that do not need deployment rights.
  • Audit existing application names for characters that could be interpreted as shell metacharacters and rename any that violate the accepted pattern before applying any temporary measures.

Generated by OpenCVE AI on June 26, 2026 at 17:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Dokku
Dokku dokku
Vendors & Products Dokku
Dokku dokku
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Dokku is a docker-powered PaaS. Prior to 0.38.2, the app name validation regex (^[a-z0-9][^/:_A-Z]*$) permits shell metacharacters. When an authenticated user pushes to a git remote with a crafted app name, the name is embedded unquoted into a bash pre-receive hook script via an unquoted heredoc (<<EOF instead of <<'EOF') in fn-git-create-hook() at plugins/git/internal-functions:378. On git push, bash interprets the semicolon as a command separator, executing arbitrary commands as the dokku user. This vulnerability is fixed in 0.38.2.
Title Dokku: OS Command Injection via App Name in Git Pre-Receive Hook
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 9, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 26, 2026, 6:41 PM
Reserved
May 12, 2026, 1:48 AM
Status
Analyzed
Published
Jun 26, 2026, 5:16 PM
Modified
Jun 26, 2026, 7:16 PM