Coder vulnerable to OIDC account takeover via email-based user matching and email_verified bypass
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, two flaws in Coder's OIDC login chained into account takeover. Email-based user matching fell back to linking by email without checking for an existing link to a different IdP subject and the `email_verified` claim was only enforced when present as a boolean `false` so an absent or non-boolean claim was treated as verified. The fix in versions 2.29.7, 2.32.7, 2.33.8, and 2.34.2 restricts the email fallback to first-time and legacy linking and defaults `email_verified` to false when the claim is absent or of an unexpected type. As a workaround, configure the OIDC provider to disallow self-registration or to require email verification before issuing tokens.
From the CVE record · GitHub_M
Coder’s OIDC login can link an account by email even when it is already linked to a different identity-provider subject. It can also treat a missing or non-boolean `email_verified` claim as verified. Together, these flaws can allow account takeover through OIDC login when those claim conditions occur; the input does not specify whether additional authentication or user interaction is required.
Operators using affected versions of Go package github.com/coder/coder/v2—>=2.34.0 <2.34.2, >=2.33.0 <2.33.8, >=2.30.0 <2.32.7, or <2.29.17—or any version of github.com/coder/coder should check their deployments.