CVE-2026-45796: Coder Unauthenticated SSRF Vulnerability

MODERATE
Advisory Identifier: GHSA-686c-7vgv-v3fx
CVSS 6.5
CWE-918
Published
Advisory Summary

CVE-2026-45796 is a MODERATE (CVSS 6.5) unauthenticated ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Coder libraries in the Go ecosystem. The issue involves unauthenticated ssrf via azure instance identity endpoint. Remediation is available by upgrading affected packages to version 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5.

CVE-2026-45796 at a Glance

CVE Identifier CVE-2026-45796
GHSA Identifier GHSA-686c-7vgv-v3fx
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Coder
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:N/S:U/C:L/I:L/A:N).

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

How to Fix CVE-2026-45796

To remediate this vulnerability, upgrade all affected Coder 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.33.3
Upgrade github.com/coder/coder/v2 to 2.33.3
github.com/coder/coder/v2 fixed: 2.32.2
Upgrade github.com/coder/coder/v2 to 2.32.2
github.com/coder/coder/v2 fixed: 2.31.12
Upgrade github.com/coder/coder/v2 to 2.31.12
github.com/coder/coder/v2 fixed: 2.30.8
Upgrade github.com/coder/coder/v2 to 2.30.8
github.com/coder/coder/v2 fixed: 2.29.13
Upgrade github.com/coder/coder/v2 to 2.29.13
github.com/coder/coder/v2 fixed: 2.24.5
Upgrade github.com/coder/coder/v2 to 2.24.5
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-45796, inspect your project dependencies for Coder:

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

Analyze the terminal output to locate any version of Coder in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.33.3), 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-918: Server-Side Request Forgery (SSRF), where 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. In Coder, 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

## 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()`](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. 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:** 1. No allowlist on `IssuingCertificateURL` hosts. Any URL was accepted. 2. `http.DefaultClient` was used. It follows redirects and connects to private, link-local, and loopback addresses. 3. Unbounded `io.ReadAll` on the response body (memory exhaustion vector). 4. 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 `Detail` field expose internal hostnames, IP addresses, port numbers, and network topology details. - **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. ## Patches Fixed in [#25274](https://github.com/coder/coder/pull/25274) (commit [`57b11d405`](https://github.com/coder/coder/commit/57b11d405f17492aa789d4b9ff33366f961a37f8)): The fix was backported to all supported release lines: | Release line | Patched version | |---|---| | 2.33 | [v2.33.3](https://github.com/coder/coder/releases/tag/v2.33.3) | | 2.32 | [v2.32.2](https://github.com/coder/coder/releases/tag/v2.32.2) | | 2.31 | [v2.31.12](https://github.com/coder/coder/releases/tag/v2.31.12) | | 2.30 | [v2.30.8](https://github.com/coder/coder/releases/tag/v2.30.8) | | 2.29 | [v2.29.13](https://github.com/coder/coder/releases/tag/v2.29.13) | | 2.24 (ESR) | [v2.24.5](https://github.com/coder/coder/releases/tag/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](https://github.com/bencalif) of [calif.io](http://calif.io/) and Anthropic's Security Team (`ANT-2026-22447`) for independently disclosing this issue!

CVE-2026-45796 Affected Coder Versions

7 component(s)
Fixed Versions:
2.33.32.32.22.31.122.30.82.29.132.24.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/coder/coder/v2
Go
≥ 2.33.0-rc.0
< 2.33.3
2.33.3
github.com/coder/coder/v2
Go
≥ 2.32.0-rc.0
< 2.32.2
2.32.2
github.com/coder/coder/v2
Go
≥ 2.31.0
< 2.31.12
2.31.12
github.com/coder/coder/v2
Go
≥ 2.30.0
< 2.30.8
2.30.8
github.com/coder/coder/v2
Go
≥ 2.29.0
< 2.29.13
2.29.13
github.com/coder/coder/v2
Go
< 2.24.5
2.24.5
github.com/coder/coder
Go
≤ 0.27.3

References

Frequently Asked Questions

What is CVE-2026-45796?
CVE-2026-45796 is a security vulnerability in Coder involving Unauthenticated SSRF via Azure Instance Identity Endpoint under CWE-918: Server-Side Request Forgery (SSRF).
Which Coder versions are affected?
Affected versions include releases prior to 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5 across affected packages: github.com/coder/coder/v2, github.com/coder/coder.
What version fixes CVE-2026-45796?
Upgrading to 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5 (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.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5. Upgrade your dependency to 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5 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-45796?
CVE-2026-45796 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-45796?
CVE-2026-45796 is classified under 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.).
How can I check Go dependencies for CVE-2026-45796?
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-686c-7vgv-v3fx",
  "modified" : "2026-05-19T19:53:51Z",
  "published" : "2026-05-19T19:53:51Z",
  "aliases" : [ "CVE-2026-45796" ],
  "summary" : "Coder: Unauthenticated SSRF via Azure Instance Identity Endpoint",
  "details" : "## 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!",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.33.0-rc.0"
      }, {
        "fixed" : "2.33.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.32.0-rc.0"
      }, {
        "fixed" : "2.32.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.31.0"
      }, {
        "fixed" : "2.31.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.30.0"
      }, {
        "fixed" : "2.30.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.29.0"
      }, {
        "fixed" : "2.29.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.24.5"
      } ]
    } ]
  }, {
    "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-686c-7vgv-v3fx"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/pull/25274"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/commit/57b11d405f17492aa789d4b9ff33366f961a37f8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coder/coder"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.24.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.29.13"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.30.8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.31.12"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.32.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.33.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-19T19:53:51Z",
    "nvd_published_at" : null
  }
}