CVE-2021-21291Subdomain checking of whitelisted domains could allow unintended redirects
- 4.7MediumCVSS base score
- 1.6%Exploitation in 30 daysEPSS · top 24% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
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.
Timeline
ID reserved
By GitHub_M
- 42 days later
· 42 days later
Published
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVDNVD · Modified | 3.1 | Medium6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 1.6% · top 24% of all CVEs (17 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.7.
Affected products
- affected < 7.0.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Gogithub.com/oauth2-proxy/oauth2-proxyGHSA-4mf2-f3wh-gvf2 (opens in a new tab)
- Gogithub.com/oauth2-proxy/oauth2-proxy/v7GHSA-4mf2-f3wh-gvf2 (opens in a new tab)
References
References4
- https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-4mf2-f3wh-gvf2 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.0.0 (opens in a new tab)x_refsource_MISCx_transferred
- https://pkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/oauth2-proxy/oauth2-proxy/commit/780ae4f3c99b579cb2ea9845121caebb6192f725 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-0944 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-4mf2-f3wh-gvf2 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-21291)Record last updated .