🛡️ CVE-2021-21411 — oauth2-proxy
Description
Incorrect authorization in OAuth2-Proxy
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.
Affected software
CVE-2021-21411 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 11 August 2025 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)
docs.gitlab.com (Web)
github.com (Web)
pkg.go.dev (Web)
Details
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/oauth2-proxy/oauth2-proxy | — | — |
| github.com/oauth2-proxy/oauth2-proxy/v7 | — | — |
| oauth2-proxy | — | — |
References
Similar Threats
- Medium CVE-2026-40574
- High CVE-2026-41059
- Critical CVE-2026-40575
- Low CVE-2026-34454
- Critical CVE-2026-34457
More CVE 2021 advisories
Browse all of CVE 2021 in the advisory index.
Vulnerability Monitoring
Track new vulnerabilities in oauth2-proxy
CVE-2021-21411 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.