🛡️ CVE-2021-21291 — oauth2-proxy

🟡 CVSS 5.0 — Medium ✅ No Known Exploit OSV
5.0
CVSS Score
0 Low4 Medium7 High9 Critical10

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

Severity Medium
CVSS Score 5.0
CVSS Vector N/A
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2024-08-21
Updated 2026-08-12
Modified 2026-03-03

Affected Packages

Software From version Fixed in
github.com/oauth2-proxy/oauth2-proxy
github.com/oauth2-proxy/oauth2-proxy/v7
oauth2-proxy

Similar Threats

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.