GHSA-qrwj-vh9x-gw5v: Github.com/coder/coder/v2 Coder's Workspace Agent API Insecure Vulnerability

HIGH
CVSS 8.3
CWE-918 CWE-863
Published
Advisory Summary

GHSA-qrwj-vh9x-gw5v is a HIGH (CVSS 8.3) coder's workspace agent api insecure vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Github.com/coder/coder/v2 libraries in the Go ecosystem. The issue involves coder's workspace agent api insecure redirect handling allowed cross-agent file read and write. Remediation is available by upgrading affected packages to version 2.34.4, 2.33.10, 2.32.9, 2.29.19.

GHSA-qrwj-vh9x-gw5v at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-qrwj-vh9x-gw5v
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Github.com/coder/coder/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.3

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

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

How to Fix GHSA-qrwj-vh9x-gw5v

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.34.4
Upgrade github.com/coder/coder/v2 to 2.34.4
github.com/coder/coder/v2 fixed: 2.33.10
Upgrade github.com/coder/coder/v2 to 2.33.10
github.com/coder/coder/v2 fixed: 2.32.9
Upgrade github.com/coder/coder/v2 to 2.32.9
github.com/coder/coder/v2 fixed: 2.29.19
Upgrade github.com/coder/coder/v2 to 2.29.19
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 GHSA-qrwj-vh9x-gw5v, 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.34.4), 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 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

### Summary `agentConn.apiClient()` used the default redirect behavior of `http.Client` while its custom transport dialed the host from the request URL as long as the port was the workspace agent HTTP API port (`4`). Agent tailnet IPs are deterministic from agent UUIDs, so a malicious workspace agent could return a redirect to another agent's tailnet IP and cause the control-plane client to send the follow-up workspace agent API request to the victim agent instead of the intended agent. Redirects that preserve the method and body, such as HTTP 307 and 308, allow replay of write and process-start requests. HTTP 301, 302 and 303 redirects only convert POST requests to GET requests, so they are sufficient to demonstrate redirected reads but not write or command-execution primitives. ### Impact An authenticated user with a running workspace and control of a modified workspace agent can redirect workspace agent API requests made to their agent toward another online workspace agent reachable on the tailnet. If the attacker knows the victim agent UUID, they can derive the victim's tailnet IP and target the victim's file APIs to read or write files as the victim workspace user. In affected versions that expose the workspace agent process API, the same primitive can be chained to command execution as the victim workspace user by writing a payload through the redirected file API and then redirecting a process-start request to execute it. This crosses workspace and tenant boundaries. ### Patches The fix disables automatic redirect following for workspace agent API clients and pins all workspace agent API dials to the intended agent's deterministic tailnet address. Requests whose URL host does not match the intended agent are rejected instead of being dialed. The fix was backported to all supported release lines: | Release line | Patched version | |---|---| | 2.34 | [v2.34.4](https://github.com/coder/coder/releases/tag/v2.34.4) | | 2.33 | [v2.33.10](https://github.com/coder/coder/releases/tag/v2.33.10) | | 2.32 | [v2.32.9](https://github.com/coder/coder/releases/tag/v2.32.9) | | 2.29 (ESR) | [v2.29.19](https://github.com/coder/coder/releases/tag/v2.29.19) | ### Workarounds None. Upgrading is required. ### Resources - Fix: #26600

GHSA-qrwj-vh9x-gw5v Affected Github.com/coder/coder/v2 Versions

4 component(s)
Fixed Versions:
2.34.42.33.102.32.92.29.19
Product / Package Ecosystem Affected Versions Fixed Version
github.com/coder/coder/v2
Go
≥ 2.34.0
< 2.34.4
2.34.4
github.com/coder/coder/v2
Go
≥ 2.33.0
< 2.33.10
2.33.10
github.com/coder/coder/v2
Go
≥ 2.30.0
< 2.32.9
2.32.9
github.com/coder/coder/v2
Go
≥ 2.27.0
< 2.29.19
2.29.19

References

Frequently Asked Questions

What is GHSA-qrwj-vh9x-gw5v?
GHSA-qrwj-vh9x-gw5v is a security vulnerability in Github.com/coder/coder/v2 involving Coder's workspace agent API insecure redirect handling allowed cross-agent file read and write under CWE-918: Server-Side Request Forgery (SSRF).
Which Github.com/coder/coder/v2 versions are affected?
Affected versions include releases prior to 2.34.4, 2.33.10, 2.32.9, 2.29.19 across affected packages: github.com/coder/coder/v2.
What version fixes GHSA-qrwj-vh9x-gw5v?
Upgrading to 2.34.4, 2.33.10, 2.32.9, 2.29.19 (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.34.4, 2.33.10, 2.32.9, 2.29.19. Upgrade your dependency to 2.34.4, 2.33.10, 2.32.9, 2.29.19 or later.
What is the CVSS score of GHSA-qrwj-vh9x-gw5v?
GHSA-qrwj-vh9x-gw5v has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with GHSA-qrwj-vh9x-gw5v?
GHSA-qrwj-vh9x-gw5v 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 GHSA-qrwj-vh9x-gw5v?
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-qrwj-vh9x-gw5v",
  "modified" : "2026-07-06T21:52:31Z",
  "published" : "2026-07-06T21:52:31Z",
  "aliases" : [ ],
  "summary" : "Coder's workspace agent API insecure redirect handling allowed cross-agent file read and write",
  "details" : "### Summary\n\n`agentConn.apiClient()` used the default redirect behavior of `http.Client` while its custom transport dialed the host from the request URL as long as the port was the workspace agent HTTP API port (`4`). Agent tailnet IPs are deterministic from agent UUIDs, so a malicious workspace agent could return a redirect to another agent's tailnet IP and cause the control-plane client to send the follow-up workspace agent API request to the victim agent instead of the intended agent.\n\nRedirects that preserve the method and body, such as HTTP 307 and 308, allow replay of write and process-start requests. HTTP 301, 302 and 303 redirects only convert POST requests to GET requests, so they are sufficient to demonstrate redirected reads but not write or command-execution primitives.\n\n### Impact\n\nAn authenticated user with a running workspace and control of a modified workspace agent can redirect workspace agent API requests made to their agent toward another online workspace agent reachable on the tailnet. If the attacker knows the victim agent UUID, they can derive the victim's tailnet IP and target the victim's file APIs to read or write files as the victim workspace user.\n\nIn affected versions that expose the workspace agent process API, the same primitive can be chained to command execution as the victim workspace user by writing a payload through the redirected file API and then redirecting a process-start request to execute it. This crosses workspace and tenant boundaries.\n\n### Patches\n\nThe fix disables automatic redirect following for workspace agent API clients and pins all workspace agent API dials to the intended agent's deterministic tailnet address. Requests whose URL host does not match the intended agent are rejected instead of being dialed.\n\nThe fix was backported to all supported release lines:\n\n| Release line | Patched version |\n|---|---|\n| 2.34 | [v2.34.4](https://github.com/coder/coder/releases/tag/v2.34.4) |\n| 2.33 | [v2.33.10](https://github.com/coder/coder/releases/tag/v2.33.10) |\n| 2.32 | [v2.32.9](https://github.com/coder/coder/releases/tag/v2.32.9) |\n| 2.29 (ESR) | [v2.29.19](https://github.com/coder/coder/releases/tag/v2.29.19) |\n\n### Workarounds\n\nNone. Upgrading is required.\n\n### Resources\n- Fix: #26600",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.34.0"
      }, {
        "fixed" : "2.34.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.33.0"
      }, {
        "fixed" : "2.33.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.30.0"
      }, {
        "fixed" : "2.32.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.27.0"
      }, {
        "fixed" : "2.29.19"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/security/advisories/GHSA-qrwj-vh9x-gw5v"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/pull/26600"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coder/coder"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863", "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-06T21:52:31Z",
    "nvd_published_at" : null
  }
}