CVE-2020-10187: Doorkeeper Exposure Of Sensitive Information To Vulnerability

HIGH
Advisory Identifier: GHSA-j7vx-8mqj-cqp9
CVSS 7.5
CWE-862
Published
Advisory Summary

CVE-2020-10187 is a HIGH (CVSS 7.5) exposure of sensitive information to vulnerability (CWE-862: Missing Authorization) affecting Doorkeeper libraries in the RubyGems ecosystem. The issue involves exposure of sensitive information to an unauthorized actor in doorkeeper. Remediation is available by upgrading affected packages to version 5.0.3, 5.1.1, 5.2.5, 5.3.2.

CVE-2020-10187 at a Glance

CVE Identifier CVE-2020-10187
GHSA Identifier GHSA-j7vx-8mqj-cqp9
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-862: Missing Authorization
Affected Product Doorkeeper
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2020-10187

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

doorkeeper fixed: 5.0.3
Upgrade doorkeeper to 5.0.3
doorkeeper fixed: 5.1.1
Upgrade doorkeeper to 5.1.1
doorkeeper fixed: 5.2.5
Upgrade doorkeeper to 5.2.5
doorkeeper fixed: 5.3.2
Upgrade doorkeeper to 5.3.2
Verify Direct and Transitive Dependencies

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

inspect dependencies for doorkeeper

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-10187, inspect your project dependencies for Doorkeeper:

inspect dependencies for doorkeeper

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Doorkeeper, 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

### Impact Information disclosure vulnerability. Allows an attacker to see all `Doorkeeper::Application` model attribute values (including secrets) using authorized applications controller if it's enabled (GET /oauth/authorized_applications.json). ### Patches These versions have the fix: * 5.0.3 * 5.1.1 * 5.2.5 * 5.3.2 ### Workarounds Patch `Doorkeeper::Application` model `#as_json(options = {})` method and define only those attributes you want to expose. Additional recommended hardening is to enable application secrets hashing ([guide](https://doorkeeper.gitbook.io/guides/security/token-and-application-secrets)), available since Doorkeeper 5.1. This would render the exposed secret useless. ### References - Commit with fix: https://github.com/doorkeeper-gem/doorkeeper/commit/25d038022c2fcad45af5b73f9d003cf38ff491f6 - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10187

CVE-2020-10187 Affected Doorkeeper Versions

4 component(s)
Fixed Versions:
5.0.35.1.15.2.55.3.2
Product / Package Ecosystem Affected Versions Fixed Version
doorkeeper
RubyGems
≥ 5.0.0
< 5.0.3
5.0.3
doorkeeper
RubyGems
≥ 5.1.0
< 5.1.1
All 1 versions
5.1.0
5.1.1
doorkeeper
RubyGems
≥ 5.2.0
< 5.2.5
5.2.5
doorkeeper
RubyGems
≥ 5.3.0
< 5.3.2
5.3.2

References

Frequently Asked Questions

What is CVE-2020-10187?
CVE-2020-10187 is a security vulnerability in Doorkeeper involving Exposure of Sensitive Information to an Unauthorized Actor in Doorkeeper under CWE-862: Missing Authorization.
Which Doorkeeper versions are affected?
Affected versions include releases prior to 5.0.3, 5.1.1, 5.2.5, 5.3.2 across affected packages: doorkeeper.
What version fixes CVE-2020-10187?
Upgrading to 5.0.3, 5.1.1, 5.2.5, 5.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is doorkeeper affected?
Yes, doorkeeper is affected in releases prior to 5.0.3, 5.1.1, 5.2.5, 5.3.2. Upgrade your dependency to 5.0.3, 5.1.1, 5.2.5, 5.3.2 or later.
What is the CVSS score of CVE-2020-10187?
CVE-2020-10187 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2020-10187?
CVE-2020-10187 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check RubyGems dependencies for CVE-2020-10187?
Run the dependency tree command: 'inspect dependencies for doorkeeper'. 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-j7vx-8mqj-cqp9",
  "modified" : "2021-07-29T16:42:27Z",
  "published" : "2020-05-07T21:11:07Z",
  "aliases" : [ "CVE-2020-10187" ],
  "summary" : "Exposure of Sensitive Information to an Unauthorized Actor in Doorkeeper",
  "details" : "### Impact\nInformation disclosure vulnerability. Allows an attacker to see all `Doorkeeper::Application` model attribute values (including secrets) using authorized applications controller if it's enabled (GET /oauth/authorized_applications.json).\n\n### Patches\n\nThese versions have the fix:\n\n* 5.0.3\n* 5.1.1\n* 5.2.5\n* 5.3.2\n\n### Workarounds\nPatch `Doorkeeper::Application` model `#as_json(options = {})` method and define only those attributes you want to expose.\n\nAdditional recommended hardening is to enable application secrets hashing ([guide](https://doorkeeper.gitbook.io/guides/security/token-and-application-secrets)), available since Doorkeeper 5.1. This would render the exposed secret useless.\n\n### References\n\n- Commit with fix: https://github.com/doorkeeper-gem/doorkeeper/commit/25d038022c2fcad45af5b73f9d003cf38ff491f6\n- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10187",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "doorkeeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "doorkeeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.1.0"
      }, {
        "fixed" : "5.1.1"
      } ]
    } ],
    "versions" : [ "5.1.0" ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "doorkeeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2.0"
      }, {
        "fixed" : "5.2.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "doorkeeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "fixed" : "5.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/doorkeeper-gem/doorkeeper/security/advisories/GHSA-j7vx-8mqj-cqp9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-10187"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/pull/446"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/doorkeeper-gem/doorkeeper/commit/25d038022c2fcad45af5b73f9d003cf38ff491f6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/doorkeeper-gem/doorkeeper/releases"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/doorkeeper/CVE-2020-10187.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-05-07T21:09:24Z",
    "nvd_published_at" : "2020-05-04T14:15:00Z"
  }
}