# CVE-2024-27918: Coder's OIDC authentication allows email with partially matching domain to register

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.2
- **CVSS:** 8.2 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.11% (percentile 66, 2026-11-26)
- **CWE:** CWE-20
- **Aliases:** GHSA-7cc2-r658-7xpf, GO-2024-2602
- **Published:** 2024-03-04T20:45:36.000Z
- **Modified:** 2026-09-10T03:50:10.195Z

## Who should check

- Projects that depend on Go package github.com/coder/coder/v2 (\>= 2.8.0, \< 2.8.4)
- Projects that depend on Go package github.com/coder/coder (\<= 0.27.3)
- Anyone running coder \>= 2.8.0, \< 2.8.4; \>= 2.7.0, \< 2.7.3; \< 2.6.1

## Description

Coder allows oragnizations to provision remote development environments via Terraform. Prior to versions 2.6.1, 2.7.3, and 2.8.4, a vulnerability in Coder's OIDC authentication could allow an attacker to bypass the \`CODER\_OIDC\_EMAIL\_DOMAIN\` verification and create an account with an email not in the allowlist. Deployments are only affected if the OIDC provider allows users to create accounts on the provider. During OIDC registration, the user's email was improperly validated against the allowed \`CODER\_OIDC\_EMAIL\_DOMAIN\`s. This could allow a user with a domain that only partially matched an allowed domain to successfully login or register. An attacker could register a domain name that exploited this vulnerability and register on a Coder instance with a public OIDC provider.

Coder instances with OIDC enabled and protected by the \`CODER\_OIDC\_EMAIL\_DOMAIN\` configuration are affected. Coder instances using a private OIDC provider are not affected, as arbitrary users cannot register through a private OIDC provider without first having an account on the provider. Public OIDC providers are impacted. GitHub authentication and external authentication are not impacted. This vulnerability is remedied in versions 2.8.4, 2.7.3, and 2.6.1 All versions prior to these patches are affected by the vulnerability.\*It is recommended that customers upgrade their deployments as soon as possible if they are utilizing OIDC authentication with the \`CODER\_OIDC\_EMAIL\_DOMAIN\` setting.

## Affected and fixed versions

- Go `github.com/coder/coder/v2`: affected \>= 2.8.0, \< 2.8.4; fixed 2.8.4, 2.7.3, 2.6.1 (osv)
- Go `github.com/coder/coder`: affected \<= 0.27.3; fixed no fix listed yet (osv)
- coder: \>= 2.8.0, \< 2.8.4; \>= 2.7.0, \< 2.7.3; \< 2.6.1 (cvelist)

## Mitigation

- Upgrade github.com/coder/coder/v2 to one of 2.8.4, 2.7.3, 2.6.1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-27918. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-27918.md
Affected: github.com/coder/coder/v2 >= 2.8.0, < 2.8.4; github.com/coder/coder <= 0.27.3
Fixed in: 2.8.4, 2.7.3, 2.6.1

Steps:
1. Search this machine and project for github.com/coder/coder/v2 (Go), github.com/coder/coder (Go), coder: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-27918 being exploited?

There is no confirmed exploitation: CVE-2024-27918 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.11% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-27918?

High: CVSS 8.2 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-27918?

github.com/coder/coder/v2 \>= 2.8.0, \< 2.8.4; github.com/coder/coder \<= 0.27.3.

### Is there a fix for CVE-2024-27918?

Yes. Fixed in 2.8.4, 2.7.3, 2.6.1. Upgrade github.com/coder/coder/v2 to one of 2.8.4, 2.7.3, 2.6.1 (or later in the same release line).

### How do I check if I'm affected by CVE-2024-27918?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/coder/coder/security/advisories/GHSA-7cc2-r658-7xpf>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-27918>
- patch: <https://github.com/coder/coder/commit/1171ce7add017481d28441575024209ac160ecb0>
- patch: <https://github.com/coder/coder/commit/2ba84911f8b02605e5958d5e4a2fe3979ec50b31>
- patch: <https://github.com/coder/coder/commit/2d37eb42e7db656e343fe1f36de5ab1a1a62f4fb>
- patch: <https://github.com/coder/coder/commit/4439a920e454a82565e445e4376c669e3b89591c>
- other: <https://github.com/coder/coder>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-27918>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-7cc2-r658-7xpf> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2024-2602> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-27918> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-27918>
