Incorrect authorization in OAuth2-Proxy
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-863.
Summary
OAuth2-Proxy is an open source reverse proxy that provides authentication with Google, Github or other providers. The `--gitlab-group` flag for group-based authorization in the GitLab provider stopped working in the v7.0.0 release. Regardless of the flag settings, authorization wasn't restricted. Additionally, any authenticated users had whichever groups were set in `--gitlab-group` added to the new `X-Forwarded-Groups` header to the upstream application. While adding GitLab project based authorization support in #630, a bug was introduced where the user session's groups field was populated with the `--gitlab-group` config entries instead of pulling the individual user's group membership from the GitLab Userinfo endpoint. When the session groups where compared against the allowed groups for authorization, they matched improperly (since both lists were populated with the same data) so authorization was allowed. This impacts GitLab Provider users who relies on group membership for authorization restrictions. Any authenticated users in your GitLab environment can access your applications regardless of `--gitlab-group` membership restrictions. This is patched in v7.1.0. There is no workaround for the Group membership bug. But `--gitlab-project` can be set to use Project membership as the authorization checks instead of groups; it is not broken.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| oauth2-proxy | oauth2-proxy | 7.0.0 to before 7.1.0 | 7.1.0 | Patch available | CNA |
| — | github.com/oauth2-proxy/oauth2-proxy/v7 (Go) | before 7.1.0 | 7.1.0 | Patch available | GHSA-652x-m2gr-hppm |
- oauth2-proxy Vendoroauth2-proxy Affected 7.0.0 to before 7.1.0 Fixed in 7.1.0 Patch available CNA
- github.com/oauth2-proxy/oauth2-proxy/v7 (Go) Vendor— Affected before 7.1.0 Fixed in 7.1.0 Patch available GHSA-652x-m2gr-hppm
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:* | 7.0.0 to before 7.1.0 | Vulnerable | oauth2-proxy |
- cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:* Versions 7.0.0 to before 7.1.0 Vulnerable ·oauth2-proxy
Remediation
- Fix · CNA oauth2-proxy (oauth2-proxy) Fixed in 7.1.0
- Fix · GHSA-652x-m2gr-hppm github.com/oauth2-proxy/oauth2-proxy/v7 (Go) Fixed in 7.1.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21411
- 2026-10-03 Alias added: GHSA-652x-m2gr-hppm
References
Advisory 5
More oauth2-proxy Oauth2 Proxy vulnerabilities
- TI-2025-34353 OAuth2-Proxy has authentication bypass in oauth2-proxy skip_auth_routes due to Query Parameter inclusion CVSS 3.1CRITICAL 9.1
- TI-2026-29315 OAuth2 Proxy has an Authentication Bypass via X-Forwarded-Uri Header Spoofing CVSS 3.1CRITICAL 9.1
- TI-2026-26722 OAuth2 Proxy: Health Check User-Agent Matching Bypasses Authentication in auth_request Mode CVSS 3.1CRITICAL 9.1
- TI-2026-29698 OAuth2 Proxy has an Authentication Bypass via Fragment Confusion in skip_auth_routes and skip_auth_regex CVSS 3.1HIGH 8.2
- TI-2017-14408 CSRF in Bitly oauth2_proxy 2.1 during authentication flow CVSS 3.0HIGH 8.8
- TI-2020-08927 Open Redirect in OAuth2 Proxy CVSS 3.1HIGH 7.1
Sources
- CVE-2021-21411 · CVE Program
- CVE-2021-21411 · NVD
- FIRST EPSS
- GHSA-652x-m2gr-hppm · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences