GHSA-686c-7vgv-v3fx CVE-2026-45796 GO-2026-5169
Coder: Unauthenticated SSRF via Azure Instance Identity Endpoint
- Severity
- 6.5 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.43%
- Chance of exploitation in the next 30 days. Higher than 37.27% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-918 Server-Side Request Forgery (SSRF)
- Fix
2.33.3- Upgrade github.com/coder/coder/v2 to this version or later
Description
Summary
Unauthenticated semi-blind Server-Side Request Forgery (SSRF) via the Azure instance identity endpoint (POST /api/v2/workspaceagents/azure-instance-identity). An external attacker can force the Coder server to issue HTTP GET requests to arbitrary internal or external hosts by submitting a crafted PKCS#7 signature. The server does not return the target's response body, but error messages in the API response reveal whether the target is reachable and what type of failure occurred.
Details
The POST /api/v2/workspaceagents/azure-instance-identity endpoint accepts a PKCS#7 signature without authentication. During certificate chain verification, azureidentity.Validate() iterates over the signer certificate's IssuingCertificateURL extension and fetches each URL using http.DefaultClient with no host restriction, no private-IP blocking, and no response-size limit.
An attacker crafts a self-signed certificate whose Common Name matches *.metadata.azure.com (passing the allowedSigners regex) and whose IssuingCertificateURL points to an attacker-chosen target. The server fetches that URL and feeds the response body into x509.ParseCertificate. The parsed result is discarded, but the wrapped error string is returned verbatim in the JSON response via Detail: err.Error(). Connection-level errors ("connection refused", "i/o timeout", DNS failures) and certificate-parse errors give the attacker enough signal to infer host reachability and port state without seeing the actual response content.
Root causes:
- No allowlist on
IssuingCertificateURLhosts. Any URL was accepted. http.DefaultClientwas used. It follows redirects and connects to private, link-local, and loopback addresses.- Unbounded
io.ReadAllon the response body (memory exhaustion vector). - Raw
err.Error()was returned in the JSON response, leaking internal HTTP client errors to the caller.
Impact
This is a semi-blind SSRF: the server makes the outbound request but the HTTP response body is consumed by x509.ParseCertificate and never returned to the attacker.
- Internal network reconnaissance. The attacker can map internal hosts and ports by observing error differentiation in the API response: "connection refused" (port closed), "i/o timeout" (host unreachable or firewalled), DNS failure (host does not exist), or certificate-parse error (port open and responding). This enables systematic scanning of the internal network from the Coder server's vantage point.
- Requests to sensitive endpoints. The server can be directed to hit cloud metadata services (e.g.
http://169.254.169.254/), internal admin interfaces, or other services. The attacker cannot read the response content, but the request itself may have side effects depending on the target. - Error-based information disclosure. Wrapped Go HTTP client errors in the
Detailfield expose internal hostnames, IP addresses, port numbers, and network topology details. - Memory exhaustion. The unbounded
io.ReadAllon the response body allows an attacker to pointIssuingCertificateURLat a large resource, forcing the server to buffer it entirely in memory.
Patches
Fixed in #25274 (commit 57b11d405):
The fix was backported to all supported release lines:
| Release line | Patched version |
|---|---|
| 2.33 | v2.33.3 |
| 2.32 | v2.32.2 |
| 2.31 | v2.31.12 |
| 2.30 | v2.30.8 |
| 2.29 | v2.29.13 |
| 2.24 (ESR) | v2.24.5 |
Workarounds
If the Azure identity-auth mechanism is not being used then restrict access to the corresponding endpoint (/api/v2/workspaceagents/azure-instance-identity) using ingress firewall and/or proxy ACLs.
Recognition
We'd like to thank Ben Tran of calif.io and Anthropic's Security Team (ANT-2026-22447) for independently disclosing this issue!
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| github.com/coder/coder | <= 0.27.3 |
No fix yet |
| github.com/coder/coder | all versions |
No fix yet |
| github.com/coder/coder/v2 | >= 2.33.0-rc.0, < 2.33.3 |
2.33.3 |
| github.com/coder/coder/v2 | >= 2.32.0-rc.0, < 2.32.2 |
2.32.2 |
| github.com/coder/coder/v2 | >= 2.31.0, < 2.31.12 |
2.31.12 |
| github.com/coder/coder/v2 | >= 2.30.0, < 2.30.8 |
2.30.8 |
| github.com/coder/coder/v2 | >= 2.29.0, < 2.29.13 |
2.29.13 |
| github.com/coder/coder/v2 | < 2.24.5 |
2.24.5 |
| github.com/coder/coder/v2 | < 2.24.5>= 2.29.0, < 2.29.13>= 2.30.0, < 2.30.8>= 2.31.0, < 2.31.12>= 2.32.0-rc.0, < 2.32.2>= 2.33.0-rc.0, < 2.33.3 |
2.24.52.29.132.30.82.31.122.32.22.33.3 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
github.com/coder/coder/v2 Go → 2.33.3
- go
go get github.com/coder/coder/v2@v2.33.3 && go mod tidy
Severity breakdown
CVSS 3.1 6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Weakness
CWE-918: Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
References
Packages
Other links
- github.com/coder/coder/security/advisories/GHSA-686c-7vgv-v3fx
- github.com/coder/coder/pull/25274
- github.com/coder/coder/commit/57b11d405f17492aa789d4b9ff33366f961a37f8
- github.com/coder/coder/releases/tag/v2.24.5
- github.com/coder/coder/releases/tag/v2.29.13
- github.com/coder/coder/releases/tag/v2.30.8
- github.com/coder/coder/releases/tag/v2.31.12
- github.com/coder/coder/releases/tag/v2.32.2
- github.com/coder/coder/releases/tag/v2.33.3
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-h58c-xccx-75m3 Coder: Stored HTML injection via unescaped ApplicationName and LogoURL appearance settings | Medium | Also affects github.com/coder/coder |
| GHSA-8fxq-53rx-ph5f Coder: Login endpoint user enumeration via timing-defense placeholder in password comparison | Medium | Also affects github.com/coder/coder |
| GHSA-qrwj-vh9x-gw5v Coder's workspace agent API insecure redirect handling allowed cross-agent file read and write | High | Also affects github.com/coder/coder |
| GHSA-5wg6-jmq2-53pw Coder's workspace app CORS origin check can be bypassed via UUID-based subdomain spoofing | Medium | Also affects github.com/coder/coder |
| GHSA-7qw2-f75v-62f7 Coder vulnerable to stored HTML injection via workspace agent logs in AgentLogLine component | Medium | Also affects github.com/coder/coder |
| GHSA-84rm-42xw-mx52 Coder's AI Bridge Proxy skips TLS certificate verification in default configuration | High | Also affects github.com/coder/coder |
| GHSA-wqxv-w64v-5wh6 Suspended Coder users retain access to AI Bridge LLM proxy endpoints | Medium | Also affects github.com/coder/coder |
| GHSA-f5vp-w269-392g Coder vulnerable to denial of service via unbounded request body in AI Bridge provider endpoints | Medium | Also affects github.com/coder/coder |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor