CVE-2020-36599: Omniauth OmniAuth's `lib/omniauth/failure_endpoint.rb` Does Not Escape Vulnerability

CRITICAL
Advisory Identifier: GHSA-pm55-qfxr-h247
CVSS 9.8
CWE-116
Published
Advisory Summary

CVE-2020-36599 is a CRITICAL (CVSS 9.8) omniauth's `lib/omniauth/failure_endpoint.rb` does not escape vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Omniauth libraries in the RubyGems ecosystem. The issue involves omniauth's `lib/omniauth/failure_endpoint.rb` does not escape `message_key` value. Remediation is available by upgrading affected packages to version 1.9.2, 2.0.0.

CVE-2020-36599 at a Glance

CVE Identifier CVE-2020-36599
GHSA Identifier GHSA-pm55-qfxr-h247
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Omniauth
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:H/A:H).

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 High (I:H)
Availability High (A:H)

How to Fix CVE-2020-36599

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

omniauth fixed: 1.9.2
Upgrade omniauth to 1.9.2
omniauth fixed: 2.0.0
Upgrade omniauth to 2.0.0
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 omniauth

How to Check if You Are Affected

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

inspect dependencies for omniauth

Analyze the terminal output to locate any version of Omniauth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.2), 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Omniauth, 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

lib/omniauth/failure_endpoint.rb in OmniAuth before 1.9.2 (and before 2.0) does not escape the message_key value.

CVE-2020-36599 Affected Omniauth Versions

2 component(s)
Fixed Versions:
1.9.22.0.0
Product / Package Ecosystem Affected Versions Fixed Version
omniauth
RubyGems
< 1.9.2
1.9.2
omniauth
RubyGems
≥ 2.0.0.pre.rc1
< 2.0.0
All 1 versions
2.0.0.pre.rc1
2.0.0

References

Frequently Asked Questions

What is CVE-2020-36599?
CVE-2020-36599 is a security vulnerability in Omniauth involving OmniAuth's `lib/omniauth/failure_endpoint.rb` does not escape `message_key` value under CWE-116: Improper Encoding or Escaping of Output.
Which Omniauth versions are affected?
Affected versions include releases prior to 1.9.2, 2.0.0 across affected packages: omniauth.
What version fixes CVE-2020-36599?
Upgrading to 1.9.2, 2.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is omniauth affected?
Yes, omniauth is affected in releases prior to 1.9.2, 2.0.0. Upgrade your dependency to 1.9.2, 2.0.0 or later.
What is the CVSS score of CVE-2020-36599?
CVE-2020-36599 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-36599?
CVE-2020-36599 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check RubyGems dependencies for CVE-2020-36599?
Run the dependency tree command: 'inspect dependencies for omniauth'. 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-pm55-qfxr-h247",
  "modified" : "2022-08-31T18:47:40Z",
  "published" : "2022-08-19T00:00:16Z",
  "aliases" : [ "CVE-2020-36599" ],
  "summary" : "OmniAuth's `lib/omniauth/failure_endpoint.rb` does not escape `message_key` value",
  "details" : "lib/omniauth/failure_endpoint.rb in OmniAuth before 1.9.2 (and before 2.0) does not escape the message_key value.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "omniauth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "omniauth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0.pre.rc1"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ],
    "versions" : [ "2.0.0.pre.rc1" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-36599"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/omniauth/omniauth/commit/43a396f181ef7d0ed2ec8291c939c95e3ed3ff00#diff-575abda9deb9b1a77bf534e898a923029b9a61e991d626db88dc6e8b34260aa2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/omniauth/omniauth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/omniauth/CVE-2020-36599.yml"
  }, {
    "type" : "WEB",
    "url" : "https://rubygems.org/gems/omniauth/versions/1.9.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-08-31T18:47:40Z",
    "nvd_published_at" : "2022-08-18T23:15:00Z"
  }
}