5.5
MEDIUM
CVE-2021-21411
OAuth2-Proxy GitLab Group Membership Authorization Bypass Vulnerability
Description

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.

INFO

Published Date :

March 26, 2021, 9:15 p.m.

Last Modified :

April 6, 2021, 12:42 p.m.

Remotely Exploitable :

Yes !

Impact Score :

2.7

Exploitability Score :

2.3
Affected Products

The following products are affected by CVE-2021-21411 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Oauth2_proxy_project oauth2_proxy
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2021-21411.

URL Resource
https://docs.gitlab.com/ee/user/group/ Third Party Advisory
https://github.com/oauth2-proxy/oauth2-proxy/commit/0279fa7dff1752f1710707dbd1ffac839de8bbfc Patch Third Party Advisory
https://github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.1.0 Release Notes Third Party Advisory
https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-652x-m2gr-hppm Third Party Advisory
https://pkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7 Product Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-21411 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-21411 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Apr. 06, 2021

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:S/C:P/I:P/A:N)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N
    Changed Reference Type https://docs.gitlab.com/ee/user/group/ No Types Assigned https://docs.gitlab.com/ee/user/group/ Third Party Advisory
    Changed Reference Type https://github.com/oauth2-proxy/oauth2-proxy/commit/0279fa7dff1752f1710707dbd1ffac839de8bbfc No Types Assigned https://github.com/oauth2-proxy/oauth2-proxy/commit/0279fa7dff1752f1710707dbd1ffac839de8bbfc Patch, Third Party Advisory
    Changed Reference Type https://github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.1.0 No Types Assigned https://github.com/oauth2-proxy/oauth2-proxy/releases/tag/v7.1.0 Release Notes, Third Party Advisory
    Changed Reference Type https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-652x-m2gr-hppm No Types Assigned https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-652x-m2gr-hppm Third Party Advisory
    Changed Reference Type https://pkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7 No Types Assigned https://pkg.go.dev/github.com/oauth2-proxy/oauth2-proxy/v7 Product, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:* versions from (including) 7.0.0 up to (excluding) 7.1.0
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-21411 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-21411 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.11 }} 0.03%

score

0.43027

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability