🛡️ CVE-2021-21291 — oauth2-proxy
Description
Subdomain checking of whitelisted domains could allow unintended redirects
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.
Affected software
CVE-2021-21291 is recorded against 3 packages.
- github.com/oauth2-proxy/oauth2-proxy
- github.com/oauth2-proxy/oauth2-proxy/v7
- oauth2-proxy
Timeline and source
Published on 21 August 2024 and last revised on 3 March 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.
References
github.com (Advisory)
nvd.nist.gov (Advisory)
github.com (Fix)
github.com (Web)
pkg.go.dev (Web)
Details
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/oauth2-proxy/oauth2-proxy | — | — |
| github.com/oauth2-proxy/oauth2-proxy/v7 | — | — |
| oauth2-proxy | — | — |
References
Similar Threats
- Medium CVE-2026-40574
- High CVE-2026-41059
- Critical CVE-2026-40575
- Low CVE-2026-34454
- Critical CVE-2026-34457
More CVE 2021 advisories
Browse all of CVE 2021 in the advisory index.
Vulnerability Monitoring
Track new vulnerabilities in oauth2-proxy
CVE-2021-21291 is rated CVSS 5.0 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.
Set Up Free Alerts →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.