Subdomain checking of whitelisted domains could allow unintended redirects
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/oauth2-proxy/oauth2-proxy/v7Go | < 7.0.0 | 7.0.0 |
github.com/oauth2-proxy/oauth2-proxyGo | <= 3.2.0 | — |
Affected products
4- osv-coords3 versionspkg:bitnami/oauth2-proxypkg:golang/github.com/oauth2-proxy/oauth2-proxypkg:golang/github.com/oauth2-proxy/oauth2-proxy/v7
< 7.0.0+ 2 more
- (no CPE)range: < 7.0.0
- (no CPE)range: <= 3.2.0
- (no CPE)range: < 7.0.0
- Range: < 7.0.0
Patches
Vulnerability mechanics
References
6- github.com/advisories/GHSA-4mf2-f3wh-gvf2ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-21291ghsaADVISORY
- github.com/oauth2-proxy/oauth2-proxy/commit/780ae4f3c99b579cb2ea9845121caebb6192f725ghsax_refsource_MISCWEB
- github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.0.0ghsax_refsource_MISCWEB
- github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-4mf2-f3wh-gvf2ghsax_refsource_CONFIRMWEB
- pkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.