Coder: Devcontainer recreate endpoint missing write authorization allows read-only roles to destroy containers
coder
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/coder/coder/v2 Go |
|
|
coder
| Product | Affected | Fixed in |
|---|---|---|
| github.com/coder/coder/v2 Go |
|
|
| github.com/coder/coder Go |
| No fix yet |
Coder allows organizations to provision remote development environments via Terraform. Prior to versions 2.29.7, 2.32.7, 2.33.8, and 2.34.2, the devcontainer recreate endpoint relied on route middleware that checked only `ActionRead` on the workspace and, unlike the sibling delete endpoint, performed no `ActionUpdate` check before triggering the destructive rebuild. Exploitation requires an existing low-privilege role with access to the target workspace. The fix in versions 2.29.7, 2.32.7, 2.33.8, and 2.34.2 adds an explicit `ActionUpdate` authorization check before the agent is dialed like the delete endpoint. No known workarounds are available.
From the CVE record · GitHub_M
The devcontainer recreate endpoint checks workspace read permission but not update permission before triggering a destructive rebuild. An attacker with an existing low-privilege role and access to the target workspace can trigger the rebuild without update permission.
Teams running affected versions of Go package github.com/coder/coder/v2 or any version of github.com/coder/coder should check their deployments.