{"id":"CVE-2026-45796","aliases":["CVE-2026-45796","GHSA-686c-7vgv-v3fx","GO-2026-5169"],"related":[],"kind":"vulnerability","state":"published","title":"Coder vulnerable to unauthenticated SSRF via Azure Instance Identity Endpoint","summary":"Coder allows organizations to provision remote development environments via Terraform. Versions prior tp 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, and 2.33.3 are vulnerable to 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. Versions 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, and 2.33.3 patch the issue. As a workaround, 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Coder allows organizations to provision remote development environments via Terraform. Versions prior tp 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, and 2.33.3 are vulnerable to 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. Versions 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, and 2.33.3 patch the issue. As a workaround, 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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nUnauthenticated 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.\n\n## Details\n\nThe `POST /api/v2/workspaceagents/azure-instance-identity` endpoint accepts a PKCS#7 signature without authentication. During certificate chain verification, [`azureidentity.Validate()`](https://github.com/coder/coder/blob/aa0e288b88/coderd/azureidentity/azureidentity.go#L83-L88) 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.\n\nAn 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.\n\n**Root causes:**\n\n1. No allowlist on `IssuingCertificateURL` hosts. Any URL was accepted.\n2. `http.DefaultClient` was used. It follows redirects and connects to private, link-local, and loopback addresses.\n3. Unbounded `io.ReadAll` on the response body (memory exhaustion vector).\n4. Raw `err.Error()` was returned in the JSON response, leaking internal HTTP client errors to the caller.\n\n## Impact\n\nThis 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.\n\n- **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.\n- **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.\n- **Error-based information disclosure.** Wrapped Go HTTP client errors in the `Detail` field expose internal hostnames, IP addresses, port numbers, and network topology details.\n- **Memory exhaustion.** The unbounded `io.ReadAll` on the response body allows an attacker to point `IssuingCertificateURL` at a large resource, forcing the server to buffer it entirely in memory.\n\n## Patches\n\nFixed in [#25274](https://github.com/coder/coder/pull/25274) (commit [`57b11d405`](https://github.com/coder/coder/commit/57b11d405f17492aa789d4b9ff33366f961a37f8)):\n\nThe fix was backported to all supported release lines:\n\n| Release line | Patched version |\n|---|---|\n| 2.33 | [v2.33.3](https://github.com/coder/coder/releases/tag/v2.33.3) |\n| 2.32 | [v2.32.2](https://github.com/coder/coder/releases/tag/v2.32.2) |\n| 2.31 | [v2.31.12](https://github.com/coder/coder/releases/tag/v2.31.12) |\n| 2.30 | [v2.30.8](https://github.com/coder/coder/releases/tag/v2.30.8) |\n| 2.29 | [v2.29.13](https://github.com/coder/coder/releases/tag/v2.29.13) |\n| 2.24 (ESR) | [v2.24.5](https://github.com/coder/coder/releases/tag/v2.24.5) |\n\n## Workarounds\n\nIf 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.\n\n### Recognition\n\nWe'd like to thank [Ben Tran](https://github.com/bencalif) of [calif.io](http://calif.io/) and Anthropic's Security Team (`ANT-2026-22447`) for independently disclosing this issue!","format":"markdown","source":"ghsa"},{"lang":"en","text":"Coder: Unauthenticated SSRF via Azure Instance Identity Endpoint in github.com/coder/coder","format":"markdown","source":"go"}],"published":"2026-05-19T19:53:51.000Z","modified":"2026-07-08T19:47:08.010Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":">= 2.33.0-rc.0, < 2.33.3","status":"affected"},{"version":">= 2.32.0-rc.0, < 2.32.2","status":"affected"},{"version":">= 2.31.0, < 2.31.12","status":"affected"},{"version":">= 2.30.0, < 2.30.8","status":"affected"},{"version":">= 2.29.0, < 2.29.13","status":"affected"},{"version":"< 2.24.5","status":"affected"}],"vendor":"coder","product":"coder","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.33.0-rc.0","status":"affected","fixed":"2.33.3"}],"ecosystem":"Go","package":"github.com/coder/coder/v2","purl":"pkg:golang/github.com/coder/coder/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.32.0-rc.0","status":"affected","fixed":"2.32.2"}],"ecosystem":"Go","package":"github.com/coder/coder/v2","purl":"pkg:golang/github.com/coder/coder/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.31.0","status":"affected","fixed":"2.31.12"}],"ecosystem":"Go","package":"github.com/coder/coder/v2","purl":"pkg:golang/github.com/coder/coder/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.30.0","status":"affected","fixed":"2.30.8"}],"ecosystem":"Go","package":"github.com/coder/coder/v2","purl":"pkg:golang/github.com/coder/coder/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.29.0","status":"affected","fixed":"2.29.13"}],"ecosystem":"Go","package":"github.com/coder/coder/v2","purl":"pkg:golang/github.com/coder/coder/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.24.5"}],"ecosystem":"Go","package":"github.com/coder/coder/v2","purl":"pkg:golang/github.com/coder/coder/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.27.3"}],"ecosystem":"Go","package":"github.com/coder/coder","purl":"pkg:golang/github.com/coder/coder","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/coder/coder","purl":"pkg:golang/github.com/coder/coder","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.24.5"},{"type":"semver","introduced":"2.29.0","status":"affected","fixed":"2.29.13"},{"type":"semver","introduced":"2.30.0","status":"affected","fixed":"2.30.8"},{"type":"semver","introduced":"2.31.0","status":"affected","fixed":"2.31.12"},{"type":"semver","introduced":"2.32.0-rc.0","status":"affected","fixed":"2.32.2"},{"type":"semver","introduced":"2.33.0-rc.0","status":"affected","fixed":"2.33.3"}],"ecosystem":"Go","package":"github.com/coder/coder/v2","purl":"pkg:golang/github.com/coder/coder/v2","source":"go"},{"ranges":[{"status":"affected","fixed":"2.24.5"},{"status":"affected","introduced":"2.29.0","fixed":"2.29.13"},{"status":"affected","introduced":"2.30.0","fixed":"2.30.8"},{"status":"affected","introduced":"2.31.0","fixed":"2.31.12"},{"status":"affected","introduced":"2.32.0","fixed":"2.32.2"},{"status":"affected","introduced":"2.33.0","fixed":"2.33.3"}],"vendor":"coder","product":"coder","cpe":"cpe:2.3:a:coder:coder:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/coder/coder/security/advisories/GHSA-686c-7vgv-v3fx","tags":["advisory","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder/pull/25274","tags":["fix","issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder/commit/57b11d405f17492aa789d4b9ff33366f961a37f8","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder/releases/tag/v2.24.5","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder/releases/tag/v2.29.13","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder/releases/tag/v2.30.8","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder/releases/tag/v2.31.12","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder/releases/tag/v2.32.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder/releases/tag/v2.33.3","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/coder","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-08T13:53:31.695Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45796","url":"https://www.cve.org/CVERecord?id=CVE-2026-45796","licence":"CVE Terms of Use","modified":"2026-07-08T13:53:41.602Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-686c-7vgv-v3fx","url":"https://github.com/advisories/GHSA-686c-7vgv-v3fx","licence":"CC-BY-4.0","modified":"2026-06-25T18:56:27.652Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5169","url":"https://pkg.go.dev/vuln/GO-2026-5169","licence":"CC-BY-4.0","modified":"2026-06-25T18:45:13.503Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45796","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45796","licence":"Public domain","modified":"2026-07-08T19:47:08.010Z"}],"updatedAt":"2026-11-25T22:59:27.320Z","epss":{"score":0.00457,"percentile":0.4138,"date":"2026-12-01T12:00:22.000Z"}}