CVE-2021-21291
MEDIUM 6.1CVSS 3.1Subdomain checking of whitelisted domains could allow unintended redirects in oauth2-proxy
OAuth2 Proxy is an open-source reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others) to validate accounts by email, domain or group. In OAuth2 Proxy before version 7.0.0, for users that use the whitelist domain feature, a domain that ended in a similar way to the intended domain could have been allowed as a redirect. For example, if a whitelist domain was configured for ".example.com", the intention is that subdomains of example.com are allowed. Instead, "example.com" and "badexample.com" could also match. This is fixed in version 7.0.0 onwards. As a workaround, one can disable the whitelist domain feature and run separate OAuth2 Proxy instances for each subdomain.
- Published
- 2 Feb 2021
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-601
- Also known as
- BIT-oauth2-proxy-2021-21291GHSA-4mf2-f3wh-gvf2GO-2022-0790
- Sources
- NVDJSONOSV GHSA-4mf2-f3wh-gvf2JSONOSV GO-2022-0790JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.8 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | oauth2_proxy_project | oauth2_proxycpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:* |
< 7.0.0 | 7.0.0 |
| OSV | Go | github.com/oauth2-proxy/oauth2-proxy/v7 | < 7.0.0 | 7.0.0 |
| OSV | Go | github.com/oauth2-proxy/oauth2-proxy | <= 3.2.0 | |
| OSV | Go | github.com/oauth2-proxy/oauth2-proxy | all versions |
References
- https://github.com/oauth2-proxy/oauth2-proxy/commit/780ae4f3c99b579cb2ea9845121caebb6192f725 · Patch, Third Party Advisory, WEB, FIX
- https://github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.0.0 · Release Notes, Third Party Advisory, WEB
- https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-4mf2-f3wh-gvf2 · Exploit, Third Party Advisory, WEB, ADVISORY
- https://pkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7 · Product, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21291 · ADVISORY
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 2 Feb 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Aug 2024)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 25 May 2021)