GHSA-qrwj-vh9x-gw5v is a high-severity (CVSS 8.3) vulnerability in github.com/coder/coder/v2. O3 Security confirms whether GHSA-qrwj-vh9x-gw5v is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Coder's workspace agent API insecure redirect handling allowed cross-agent file read and write
Real-World Exposure
github.com/coder/coder/v2🐹github.com/coder/coder/v2🐹github.com/coder/coder/v2🐹github.com/coder/coder/v2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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:
Workarounds
None. Upgrading is required.
Resources
- Fix: #26600
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/coder/coder/v2 | ≥ 2.34.0&&< 2.34.4 | 2.34.4 |
| 🐹Go | github.com/coder/coder/v2 | ≥ 2.33.0&&< 2.33.10 | 2.33.10 |
| 🐹Go | github.com/coder/coder/v2 | ≥ 2.30.0&&< 2.32.9 | 2.32.9 |
| 🐹Go | github.com/coder/coder/v2 | ≥ 2.27.0&&< 2.29.19 | 2.29.19 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/coder/coder/v2. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update github.com/coder/coder/v2 to 2.34.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qrwj-vh9x-gw5v is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-qrwj-vh9x-gw5v is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-qrwj-vh9x-gw5v. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-qrwj-vh9x-gw5v in your dependencies?
O3 detects GHSA-qrwj-vh9x-gw5v across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.