cve.bz

CVE-2021-21411 oauth2 proxy project oauth2 proxy: Incorrect Authorization

5.5 mediumEPSS 1.1%Fix available

Medium (5.5) in oauth2 proxy project oauth2 proxy. EPSS 1.1% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/oauth2-proxy/oauth2-proxy/v7 7.1.0.

On this page
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.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N
EPSS
1.1% (unchanged from 1.1% a week ago; 1.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 66th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-863 Incorrect Authorization
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-21411 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-21411?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-21411?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-21411 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
oauth2_proxy_project:oauth2_proxyfrom 7.0.0 before 7.1.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-652x-m2gr-hppmGogithub.com/oauth2-proxy/oauth2-proxy/v7<7.1.07.1.0
GO-2025-3832Gogithub.com/oauth2-proxy/oauth2-proxyall versionsno fix published
GO-2025-3832Gogithub.com/oauth2-proxy/oauth2-proxy/v7<7.1.07.1.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
SUSELinux Enterprise Module for Package Hub 15 SP6govulncheck-vulndb0.0.20250814T182633-150000.1.98.1SUSE-SU-2025:02912-1
openSUSELeap 15.6govulncheck-vulndb0.0.20250814T182633-150000.1.98.1SUSE-SU-2025:02912-1
openSUSETumbleweedgovulncheck-vulndb0.0.20250811T192933-1.1openSUSE-SU-2025:15434-1

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: SUSE · openSUSE.

References

Check your stackJSON