CVE-2021-21411 json
Incorrect authorization in OAuth2-Proxy
published 5y ago modified 2mo ago also BIT-oauth2-proxy-2021-21411 , EUVD-2021-8702 , GHSA-652x-m2gr-hppm , GO-2025-3832
- cvss
- 5.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 65%
- public exploits
- 0
- none known
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.
Patch / fix
- go github.com/oauth2-proxy/oauth2-proxy/v7 7.1.0
- bitnami oauth2-proxy 7.1.0
- oauth2_proxy_project oauth2_proxy 7.1.0
- govulncheck-vulndb SLE Module for Package Hub 15 SP6, openSUSE Leap 15.6 0.0.20250814T182633-150000.1.98.1
suse advisories SUSE-SU-2025:02912-1
- govulncheck-vulndb openSUSE Tumbleweed 0.0.20250811T192933-1.1
opensuse advisories openSUSE-SU-2025:15434-1
Is CVE-2021-21411 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
1.07% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.5 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 5.5 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 5.5 | AV:N/AC:L/Au:S/C:P/I:P/A:N |
| OSV | 3.1 | 5.5 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/oauth2-proxy/oauth2-proxy/v7 | <7.1.0 |
7.1.0 |
| bitnami | oauth2-proxy | >=7.0.0, <7.1.0 |
7.1.0 |
| go | github.com/oauth2-proxy/oauth2-proxy | all versions |
no fix listed |
Affected products
- oauth2-proxy oauth2-proxy
Classification
References
-
github.com
/oauth2-proxy/oauth2-proxy/commit/0279fa7dff1752f1710707dbd1ffac839de8bbfc
web, patch, third-party-advisory, advisory
-
pkg.go.dev
/github.com/oauth2-proxy/oauth2-proxy/v7
web, product, third-party-advisory, advisory
-
github.com
/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-652x-m2gr-hppm
web, third-party-advisory, advisory
-
docs.gitlab.com
/ee/user/group/
third-party-advisory, advisory
-
github.com
/oauth2-proxy/oauth2-proxy/releases/tag/v7.1.0
web, release-notes, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-21411
advisory, web
-
docs.gitlab.com
/ee/user/group
web
-
github.com
/oauth2-proxy/oauth2-proxy
package
Sources
- CVE List CVE-2021-21411
- GitHub Advisory GHSA-652x-m2gr-hppm
- NVD CVE-2021-21411
- OSV BIT-oauth2-proxy-2021-21411
- OSV GO-2025-3832
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.