All CVEs / Oauth2 Proxy Project
CVE-2021-21291Oauth2 Proxy Project Oauth2 Proxy
Medium 6.1 No auth needed
Follow: this CVE · Oauth2 Proxy Project · Oauth2 Proxy Project Oauth2 Proxy We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.6% probability of exploitation in 30 days · percentile 76
- Auth required
- No
- Published
- Feb 2, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-601
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Oauth2 Proxy.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/oauth2-proxy/oauth2-proxy |
≤ 3.2.0 |
no fixed version | — |
| Go | github.com/oauth2-proxy/oauth2-proxy |
all |
no fixed version | — |
| Go | github.com/oauth2-proxy/oauth2-proxy/v7 |
< 7.0.0 |
7.0.0 |
go get github.com/oauth2-proxy/oauth2-proxy/v7@v7.0.0 |
| Go | github.com/oauth2-proxy/oauth2-proxy/v7 |
< 7.0.0 |
7.0.0 |
go get github.com/oauth2-proxy/oauth2-proxy/v7@v7.0.0 |
Per OSV / GitHub Advisories (GHSA-4mf2-f3wh-gvf2, GO-2022-0790). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| oauth2_proxy_project | oauth2_proxy | < 7.0.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Release Notes Third Party Advisory
- github.com Exploit Third Party Advisory
- pkg.go.dev Product Third Party Advisory