CVE-2020-2228: Gitlab oauth Improper Authorization Of Users And Vulnerability

HIGH
Advisory Identifier: GHSA-qq38-mxpq-rrpj
CVSS 8.1
CWE-863
Published
Advisory Summary

CVE-2020-2228 is a HIGH (CVSS 8.1) improper authorization of users and vulnerability (CWE-863: Incorrect Authorization) affecting Gitlab oauth libraries in the Maven ecosystem. The issue involves improper authorization of users and groups with the same base name in jenkins gitlab authentication plugin. Remediation is available by upgrading affected packages to version 1.6.

CVE-2020-2228 at a Glance

CVE Identifier CVE-2020-2228
GHSA Identifier GHSA-qq38-mxpq-rrpj
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-863: Incorrect Authorization
Affected Product Gitlab oauth
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2020-2228

To remediate this vulnerability, upgrade all affected Gitlab oauth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.jenkins-ci.plugins:gitlab-oauth fixed: 1.6
<dependency>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>gitlab-oauth</artifactId>
    <version>1.6</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.jenkins-ci.plugins

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2020-2228, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.jenkins-ci.plugins

Analyze the terminal output to locate any version of Gitlab oauth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.jenkins-ci.plugins command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Gitlab oauth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

GitLab Authentication Plugin 1.5 and earlier does not differentiate between user names and hierarchical group names when performing authorization. This allows an attacker with permissions to create groups in GitLab to gain the privileges granted to another user or group. GitLab Authentication Plugin 1.6 performs user name and group name authorization checks using the appropriate GitLab APIs.

CVE-2020-2228 Affected Gitlab oauth Versions

1 component(s)
Fixed Versions:
1.6
Product / Package Ecosystem Affected Versions Fixed Version
org.jenkins-ci.plugins:gitlab-oauth
Maven
< 1.6
1.6

References

Frequently Asked Questions

What is CVE-2020-2228?
CVE-2020-2228 is a security vulnerability in Gitlab oauth involving Improper authorization of users and groups with the same base name in Jenkins GitLab Authentication Plugin under CWE-863: Incorrect Authorization.
Which Gitlab oauth versions are affected?
Affected versions include releases prior to 1.6 across affected packages: org.jenkins-ci.plugins:gitlab-oauth.
What version fixes CVE-2020-2228?
Upgrading to 1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gitlab-oauth affected?
Yes, org.jenkins-ci.plugins:gitlab-oauth is affected in releases prior to 1.6. Upgrade your dependency to 1.6 or later.
What is the CVSS score of CVE-2020-2228?
CVE-2020-2228 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-2228?
CVE-2020-2228 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Maven dependencies for CVE-2020-2228?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.jenkins-ci.plugins'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qq38-mxpq-rrpj",
  "modified" : "2022-12-28T23:44:46Z",
  "published" : "2022-05-24T17:23:39Z",
  "aliases" : [ "CVE-2020-2228" ],
  "summary" : "Improper authorization of users and groups with the same base name in Jenkins GitLab Authentication Plugin",
  "details" : "GitLab Authentication Plugin 1.5 and earlier does not differentiate between user names and hierarchical group names when performing authorization. This allows an attacker with permissions to create groups in GitLab to gain the privileges granted to another user or group.\n\nGitLab Authentication Plugin 1.6 performs user name and group name authorization checks using the appropriate GitLab APIs.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.plugins:gitlab-oauth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.5"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-2228"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jenkinsci/gitlab-oauth-plugin"
  }, {
    "type" : "WEB",
    "url" : "https://jenkins.io/security/advisory/2020-07-15/#SECURITY-1792"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2020/07/15/5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-28T23:44:46Z",
    "nvd_published_at" : "2020-07-15T18:15:00Z"
  }
}