CVE-2021-21291

Subdomain checking of whitelisted domains could allow unintended redirects

MEDIUM
6.1
CVSS Score
Published: February 2, 2021 at 07:05 PM UTC
Updated: June 17, 2026 at 03:35 AM UTC
2 products affected across 2 vendorsOAUTH2 ProxyOAuth2 Proxy

Using oauth2-proxy by oauth2-proxy?

Get instant alerts when new vulnerabilities affect oauth2-proxy - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.1
Exploit prediction
EPSS 2%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 7.0.0
Affected range stops below 7.0.0, so it looks safe — our inference, not a vendor statement
v < 7.0.0
Affected range stops below 7.0.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-601

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card