8.3high
Coder vulnerable to SSH config injection via unsanitized server-supplied values in `coder config-ssh`
- Severity
- 8.3high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.35% (higher than 30% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mcqq-fqgf-rxwmGO-2026-5913
Description
Coder allows organizations to provision remote development environments via Terraform. Prior to versions 2.29.7, 2.32.7, 2.33.8, and 2.34.2, `coder config-ssh` wrote server-supplied SSH settings (`HostnameSuffix`, `SSHConfigOptions`) into the user's `~/.ssh/config` without sanitizing embedded newlines or restricting directives so a malicious or compromised Coder server could inject arbitrary SSH configuration. Practical exploitation requires control of the server-supplied values through a malicious or compromised deployment, a man-in-the-middle position or admin access to the `HostnameSuffix` and `SSHConfigOptions` settings. The fix in versions 2.29.7, 2.32.7, 2.33.8, and 2.34.2 validates `HostnameSuffix` and `SSHConfigOptions` against a strict character set that rejects newlines and other control characters. As a workaround, inspect `coder config-ssh --dry-run` output before applying changes.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| coder coder | >= 2.34.0, < 2.34.2, >= 2.33.0, < 2.33.8, >= 2.30.0, < 2.32.7, < 2.29.17, before 2.29.17, from 2.30.0 before 2.32.7, from 2.33.0 before 2.33.8, from 2.34.0 before 2.34.2 | CVE List, NVD |
| github.com/coder/coder/v2 (Go) | from 2.34.0 before 2.34.2, from 2.33.0 before 2.33.8, from 2.30.0 before 2.32.7, before 2.29.17 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/coder/coder (Go) | all versions | Go Vulnerability Database |
All scores
| GitHub_M | 8.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H |
| GitHub | 8.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H |
Classification
What each source says
CVE List
Coder allows organizations to provision remote development environments via Terraform. Prior to versions 2.29.7, 2.32.7, 2.33.8, and 2.34.2, `coder config-ssh` wrote server-supplied SSH settings (`HostnameSuffix`, `SSHConfigOptions`) into the user's `~/.ssh/config` without sanitizing embedded newlines or restricting directives so a malicious or compromised Coder server could inject arbitrary SSH configuration. Practical exploitation requires control of the server-supplied values through a malicious or compromised deployment, a man-in-the-middle position or admin access to the `HostnameSuffix` and `SSHConfigOptions` settings. The fix in versions 2.29.7, 2.32.7, 2.33.8, and 2.34.2 validates `HostnameSuffix` and `SSHConfigOptions` against a strict character set that rejects newlines and other control characters. As a workaround, inspect `coder config-ssh --dry-run` output before applying changes.
GitHub Advisory Database
Summary
coder config-ssh wrote server-supplied SSH settings (HostnameSuffix, SSHConfigOptions) into the user's ~/.ssh/config without sanitizing embedded newlines or restricting directives so a malicious or compromised Coder server could inject arbitrary SSH configuration.
Note: Practical exploitation requires control of the server-supplied values through a malicious or compromised deployment, a man-in-the-middle position or admin access to the
HostnameSuffixandSSHConfigOptionssettings.
Impact
A server administrator or an attacker who controlled the server, could inject a directive such as ProxyCommand and achieve arbitrary code execution on any developer workstation that ran coder config-ssh. Injected commands ran with the local user's privileges and applied to all SSH connections, not just Coder workspaces.
Patches
The fix validates HostnameSuffix and SSHConfigOptions against a strict character set that rejects newlines and other control characters.
The fix was backported to all supported release lines:
Workarounds
Inspect coder config-ssh --dry-run output before applying changes.
Resources
- Fix: #26154
Credits
Coder would like to thank Anthropic's Security Team (ANT-2026-22437) for independently disclosing this issue!
Go Vulnerability Database
Coder vulnerable to SSH config injection via unsanitized server-supplied values in coder config-ssh in github.com/coder/coder
References
| https://github.com/coder/coder/security/advisories/GHSA-mcqq-fqgf-rxwm | advisory, patch, vendor-advisory, web | |
| https://github.com/coder/coder/pull/26154 | fix, issue-tracking, patch, web | |
| https://github.com/coder/coder/releases/tag/v2.29.17 | release-notes | |
| https://github.com/coder/coder/releases/tag/v2.32.7 | release-notes | |
| https://github.com/coder/coder/releases/tag/v2.33.8 | release-notes | |
| https://github.com/coder/coder/releases/tag/v2.34.2 | release-notes | |
| https://github.com/coder/coder | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-55427 changed 2026-07-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mcqq-fqgf-rxwm changed 2026-07-07 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5913 changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2026-55427 changed 2026-07-08 | Public domain |