V2: Coder's workspace agent API insecure redirect handling allowed cross-agent file read and write
### 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
AI Analysis
Technical Summary
The vulnerability stems from the workspace agent API client using the default HTTP client redirect behavior while dialing hosts based on the request URL's host if the port matches the workspace agent API port. Because agent tailnet IPs are deterministic from agent UUIDs, a malicious agent can craft redirects to another agent's tailnet IP, causing the client to send follow-up API requests to a victim agent instead of the intended one. Redirects that preserve method and body (HTTP 307, 308) enable replay of write and process-start requests, allowing cross-agent file read, write, and command execution as the victim workspace user. The fix disables automatic redirect following and enforces that API requests are only dialed to the intended agent's deterministic tailnet address, rejecting requests with mismatched hosts.
Potential Impact
An authenticated user with control over a modified workspace agent can redirect API requests to other agents on the tailnet, enabling unauthorized reading and writing of files as the victim workspace user. In versions exposing the process API, this can be escalated to command execution under the victim's user context, crossing workspace and tenant boundaries. This results in high confidentiality and integrity impact, with limited availability impact.
Mitigation Recommendations
Upgrading to the patched versions is required as no workarounds exist. The fix is included in versions 2.34.4, 2.33.10, 2.32.9, and 2.29.19 and later. The fix disables automatic HTTP redirect following for workspace agent API clients and enforces strict host validation to prevent redirect-based attacks.
V2: Coder's workspace agent API insecure redirect handling allowed cross-agent file read and write
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: | 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
CVSS v3.1
Score 8.3high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability stems from the workspace agent API client using the default HTTP client redirect behavior while dialing hosts based on the request URL's host if the port matches the workspace agent API port. Because agent tailnet IPs are deterministic from agent UUIDs, a malicious agent can craft redirects to another agent's tailnet IP, causing the client to send follow-up API requests to a victim agent instead of the intended one. Redirects that preserve method and body (HTTP 307, 308) enable replay of write and process-start requests, allowing cross-agent file read, write, and command execution as the victim workspace user. The fix disables automatic redirect following and enforces that API requests are only dialed to the intended agent's deterministic tailnet address, rejecting requests with mismatched hosts.
Potential Impact
An authenticated user with control over a modified workspace agent can redirect API requests to other agents on the tailnet, enabling unauthorized reading and writing of files as the victim workspace user. In versions exposing the process API, this can be escalated to command execution under the victim's user context, crossing workspace and tenant boundaries. This results in high confidentiality and integrity impact, with limited availability impact.
Mitigation Recommendations
Upgrading to the patched versions is required as no workarounds exist. The fix is included in versions 2.34.4, 2.33.10, 2.32.9, and 2.29.19 and later. The fix disables automatic HTTP redirect following for workspace agent API clients and enforces strict host validation to prevent redirect-based attacks.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-qrwj-vh9x-gw5v
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a4c33f027e9c797195ec89b
Added to database: 07/06/2026, 23:02:08 UTC
Last enriched: 07/06/2026, 23:05:58 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 38
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.