Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS03Y2MyLXI2NTgtN3hwZs4AA5wH
Coder's OIDC authentication allows email with partially matching domain to register
Summary
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 (such as public providers like google.com
).
Details
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 (e.g. [email protected]
would match the allowed domain corp.com
).
An attacker could register a domain name that exploited this vulnerability and register on a Coder instance with a public OIDC provider.
Impact
Coder instances with OIDC enabled and protected by the CODER_OIDC_EMAIL_DOMAIN
configuration.
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 (such as google.com
without permitted domains set on the OAuth2 App) are impacted.
GitHub authentication and external authentication are not impacted.
Was my deployment impacted?
To check if your deployment was exploited:
- View the audit log on your deployment for unexpected registered users (using the
action:register
filter) - Check the users list for unexpected users
- Users created via this exploit will have a domain that ends with one of the allowed domains but doesn’t fully match (e.g.
@exploitcorp.com
instead of@corp.com
)
- Users created via this exploit will have a domain that ends with one of the allowed domains but doesn’t fully match (e.g.
Patched Versions
This vulnerability is remedied in
- v2.8.4
- v2.7.3
- v2.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.
Thanks
References
https://github.com/coder/coder/security/advisories/GHSA-7cc2-r658-7xpf
https://github.com/coder/coder/commit/4439a920e454a82565e445e4376c669e3b89591c
https://nvd.nist.gov/vuln/detail/CVE-2024-27918
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03Y2MyLXI2NTgtN3hwZs4AA5wH
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: 9 months ago
Updated: 9 months ago
CVSS Score: 8.2
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Identifiers: GHSA-7cc2-r658-7xpf, CVE-2024-27918
References:
- https://github.com/coder/coder/security/advisories/GHSA-7cc2-r658-7xpf
- https://github.com/coder/coder/commit/1171ce7add017481d28441575024209ac160ecb0
- https://github.com/coder/coder/commit/2ba84911f8b02605e5958d5e4a2fe3979ec50b31
- https://github.com/coder/coder/commit/2d37eb42e7db656e343fe1f36de5ab1a1a62f4fb
- https://github.com/coder/coder/commit/4439a920e454a82565e445e4376c669e3b89591c
- https://nvd.nist.gov/vuln/detail/CVE-2024-27918
- https://github.com/advisories/GHSA-7cc2-r658-7xpf
Blast Radius: 0.0
Affected Packages
go:github.com/coder/coder
Dependent packages: 2Dependent repositories: 1
Downloads:
Affected Version Ranges: <= 0.27.3
No known fixed version
All affected versions: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.5.10, 0.5.11, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.7.9, 0.7.10, 0.7.11, 0.7.12, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.8.10, 0.8.11, 0.8.12, 0.8.13, 0.8.14, 0.8.15, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5, 0.12.6, 0.12.7, 0.12.8, 0.12.9, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.13.4, 0.13.5, 0.13.6, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.16.0, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.22.0, 0.22.1, 0.22.2, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.23.5, 0.23.6, 0.23.7, 0.24.0, 0.24.1, 0.25.0, 0.26.0, 0.26.1, 0.26.2, 0.27.0, 0.27.1, 0.27.2, 0.27.3
go:github.com/coder/coder/v2
Dependent packages: 4Dependent repositories: 0
Downloads:
Affected Version Ranges: < 2.6.1, >= 2.7.0, < 2.7.3, >= 2.8.0, < 2.8.4
Fixed in: 2.6.1, 2.7.3, 2.8.4
All affected versions: 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.2.0, 2.2.1, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.4.0, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.8.2, 2.8.3
All unaffected versions: 2.6.1, 2.7.3, 2.8.4, 2.8.5, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.9.4, 2.10.0, 2.10.1, 2.10.2, 2.10.3, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.11.4, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.12.4, 2.12.5, 2.12.6, 2.13.0, 2.13.1, 2.13.2, 2.13.3, 2.13.4, 2.13.5, 2.14.0, 2.14.1, 2.14.2, 2.14.3, 2.14.4, 2.15.0, 2.15.1, 2.15.2, 2.15.3, 2.15.4, 2.16.0, 2.16.1, 2.17.0, 2.17.1, 2.17.2