GHSA-qrwj-vh9x-gw5v

Suggest an improvement
Source
https://github.com/advisories/GHSA-qrwj-vh9x-gw5v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-qrwj-vh9x-gw5v/GHSA-qrwj-vh9x-gw5v.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-qrwj-vh9x-gw5v
Aliases
Published
2026-07-06T21:52:31Z
Modified
2026-09-16T03:55:37Z
Severity
  • 8.3 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L CVSS Calculator
Summary
Coder's workspace agent API insecure redirect handling allowed cross-agent file read and write
Details

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
2.33 v2.33.10
2.32 v2.32.9
2.29 (ESR) v2.29.19

Workarounds

None. Upgrading is required.

Resources

  • Fix: #26600
Database specific
{
    "cwe_ids":  [
        "CWE-863",
        "CWE-918"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-07-06T21:52:31Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Go / github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.34.0
Fixed
2.34.4

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-qrwj-vh9x-gw5v/GHSA-qrwj-vh9x-gw5v.json"

Go / github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.33.0
Fixed
2.33.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-qrwj-vh9x-gw5v/GHSA-qrwj-vh9x-gw5v.json"

Go / github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.30.0
Fixed
2.32.9

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-qrwj-vh9x-gw5v/GHSA-qrwj-vh9x-gw5v.json"

Go / github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.27.0
Fixed
2.29.19

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-qrwj-vh9x-gw5v/GHSA-qrwj-vh9x-gw5v.json"