安全速报自动同步 · 保留上游原文

【高危】v2 安全更新(GHSA-qrwj-vh9x-gw5v)

S
KHack 安全情报
2026/7/7 发布 · 9 阅读

安全情报快照 · 风险级别:高危 · CVSS:8.3 · GHSA-qrwj-vh9x-gw5v

先看结论

v2存在安全风险,>= 2.34.0, < 2.34.4 受影响,建议升级至 2.34.4。

影响范围

生态 组件 受影响版本 首个修复版本
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

处置建议

优先将 github.com/coder/coder/v2 升级至 2.34.4 或更高版本;升级前请结合业务依赖完成兼容性验证。

上游技术详情(原文)

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

来源与许可

本页自动同步 GitHub Advisory Database 的公开数据,并保留上游原文供核验;不宣称原创分析。数据许可:CC-BY-4.0。

评论

还没有评论,来说两句。