CVE-2021-21411
CVE-2021-21411 · Incorrect authorization in OAuth2-Proxy
CVSS 5.5 · Medium · EPSS 1.1%
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- oauth2-proxyNo fix published
Assess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
- Published
- Updated
Fixes in distributions
- SUSE-SU-2025:02912-1 · openSUSE Leap 15.6, SUSE Linux Enterprise Module for Package Hub 15 SP6 ·
- openSUSE-SU-2025:15434-1 · openSUSE Tumbleweed ·
Affected products and versions
oauth2-proxy
- Versions
- >= 7.0.0, < 7.1.0: Affected
No fix published
Original sources
- https://pkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7
- https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-652x-m2gr-hppm
- https://github.com/oauth2-proxy/oauth2-proxy/commit/0279fa7dff1752f1710707dbd1ffac839de8bbfc
- https://docs.gitlab.com/ee/user/group/
- https://github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.1.0
- https://nvd.nist.gov/vuln/detail/CVE-2021-21411