OAuth2-Proxy's `--gitlab-group` GitLab Group Authorization config flag stopped working in v7.0.0
Published 30 Jul 2025 · Updated 8 Jul 2026
Is your project on an affected github.com/oauth2-proxy/oauth2-proxy/v7?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <7.1.0
- Fixed in
- 7.1.0
go get github.com/oauth2-proxy/oauth2-proxy/v7@v7.1.0Details
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.
Impact
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.
Patches
This is patched in v7.1.0
Workarounds
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.
Is GHSA-652x-m2gr-hppm in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/oauth2-proxy/oauth2-proxy/v7, and gives you the command that fixes it.
More advisories for github.com/oauth2-proxy/oauth2-proxy/v7
- LowCVE-2026-41059OAuth2 Proxy has an Authentication Bypass via Fragment Confusion in skip_auth_routes and skip_auth_regex in github.com/oauth2-proxy/oauth2-proxy · 25 Jun 2026
- LowCVE-2026-40574OAuth2 Proxy has an Authorization Bypass in Email Domain Validation via Malformed Multi-@ Email Claims in github.com/oauth2-proxy/oauth2-proxy · 25 Jun 2026
- LowCVE-2026-34454OAuth2 Proxy's session cookies are not cleared when rendering sign-in page in github.com/oauth2-proxy/oauth2-proxy · 25 Jun 2026
- LowCVE-2026-40575OAuth2 Proxy has an Authentication Bypass via X-Forwarded-Uri Header Spoofing in github.com/oauth2-proxy/oauth2-proxy · 25 Jun 2026
- LowCVE-2026-34457OAuth2 Proxy's Health Check User-Agent Matching Bypasses Authentication in auth_request Mode in github.com/oauth2-proxy/oauth2-proxy · 25 Jun 2026
- HighCVE-2026-41059OAuth2 Proxy has an Authentication Bypass via Fragment Confusion in skip_auth_routes and skip_auth_regex · 15 Apr 2026
References
- Linkgithub.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-652x-m2gr-hppm
- Advisorynvd.nist.gov/vuln/detail/CVE-2021-21411
- Linkgithub.com/oauth2-proxy/oauth2-proxy/commit/0279fa7dff1752f1710707dbd1ffac839de8bbfc
- Linkdocs.gitlab.com/ee/user/group
- Packagegithub.com/oauth2-proxy/oauth2-proxy
- Linkgithub.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.1.0
- Linkpkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.