Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-21291
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 08:55 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-21291
Complete source record
{
"id": "22c0658a08e28504bba619e8bb4091f780efc3c937f417b36de21205f7520634",
"url": "https://osv.dev/vulnerability/CVE-2021-21291",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-21291",
"summary": "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.",
"evidence": "osv:CVE-2021-21291",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-21291",
"aliases": [
"BIT-oauth2-proxy-2021-21291",
"CVE-2021-21291",
"GHSA-4mf2-f3wh-gvf2",
"GO-2022-0790"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/oauth2-proxy/oauth2-proxy",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "06985879e19c3d47ed73ff650b67e2e775f88feb"
},
{
"fixed": "780ae4f3c99b579cb2ea9845121caebb6192f725"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "7.0.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "780ae4f3c99b579cb2ea9845121caebb6192f725"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "06985879e19c3d47ed73ff650b67e2e775f88feb"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v7.0.0"
}
]
}
}
],
"versions": [
"v6.1.1",
"v6.1.0",
"v6.0.0",
"v5.1.0",
"v5.0.0",
"v4.1.0",
"v4.0.0",
"v3.2.0",
"v3.1.0",
"v3.0.0",
"v2.2",
"v2.1",
"v2.0.1",
"v2.0",
"v1.1.1",
"v1.1",
"v1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21291.json"
}
}
],
"modified": "2026-10-24T10:50:40.428991441Z",
"provider": "osv",
"references": [
"https://github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.0.0",
"https://pkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7",
"https://github.com/oauth2-proxy/oauth2-proxy/commit/780ae4f3c99b579cb2ea9845121caebb6192f725",
"https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-4mf2-f3wh-gvf2"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:*"
],
"vendor_product": "oauth2_proxy_project:oauth2_proxy",
"extracted_events": [
{
"range": [
{
"fixed": "7.0.0"
}
],
"source": "CPE_RANGE"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-21291",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 442451,
"published_at": "2021-02-02T19:15:14.33+00:00"
}