Vulnerabilities in pkg:gem/omniauth-auth0

PACKAGE
Advisory Identifier: GHSA-58r4-h6v8-jcvm
Advisory Summary

CVE-2020-15240 is a HIGH (CVSS 7.4) regression vulnerability (CWE-287: Improper Authentication) affecting Omniauth auth0 libraries in the RubyGems ecosystem. The issue involves regression in jwt signature validation. Remediation is available by upgrading affected packages to version 2.4.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/omniauth-auth0

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/omniauth-auth0. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-58r4-h6v8-jcvm CVE-2020-15240 HIGH Regression in JWT Signature Validation

CVE-2020-15240 at a Glance

CVE Identifier CVE-2020-15240
GHSA Identifier GHSA-58r4-h6v8-jcvm
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-287: Improper Authentication
Affected Product Omniauth auth0
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.4

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:N).

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 None (A:N)

How to Fix CVE-2020-15240

To remediate this vulnerability, upgrade all affected Omniauth auth0 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-auth0 fixed: 2.4.1
Upgrade omniauth-auth0 to 2.4.1
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-auth0

How to Check if You Are Affected

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

inspect dependencies for omniauth-auth0

Analyze the terminal output to locate any version of Omniauth auth0 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.1), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Omniauth auth0, 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

### Overview Versions after and including `2.3.0` are improperly validating the JWT token signature when using the `JWTValidator.verify` method. Improper validation of the JWT token signature when not using the default Authorization Code Flow can allow an attacker to bypass authentication and authorization. ### Am I affected? You are affected by this vulnerability if all of the following conditions apply: - You are using `omniauth-auth0`. - You are using `JWTValidator.verify` method directly OR you are not authenticating using the SDK’s default Authorization Code Flow. ### How to fix that? Upgrade to version `2.4.1`. ### Will this update impact my users? The fix provided in this version will not affect your users.

CVE-2020-15240 Affected Omniauth auth0 Versions

1 component(s)
Fixed Versions:
2.4.1
Product / Package Ecosystem Affected Versions Fixed Version
omniauth-auth0
RubyGems
≥ 2.3.0
< 2.4.1
2.4.1

References

Frequently Asked Questions

What is CVE-2020-15240?
CVE-2020-15240 is a security vulnerability in Omniauth auth0 involving Regression in JWT Signature Validation under CWE-287: Improper Authentication.
Which Omniauth auth0 versions are affected?
Affected versions include releases prior to 2.4.1 across affected packages: omniauth-auth0.
What version fixes CVE-2020-15240?
Upgrading to 2.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is omniauth-auth0 affected?
Yes, omniauth-auth0 is affected in releases prior to 2.4.1. Upgrade your dependency to 2.4.1 or later.
What is the CVSS score of CVE-2020-15240?
CVE-2020-15240 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2020-15240?
CVE-2020-15240 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check RubyGems dependencies for CVE-2020-15240?
Run the dependency tree command: 'inspect dependencies for omniauth-auth0'. 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-58r4-h6v8-jcvm",
  "modified" : "2023-05-16T16:04:23Z",
  "published" : "2020-11-03T02:31:38Z",
  "aliases" : [ "CVE-2020-15240" ],
  "summary" : "Regression in JWT Signature Validation",
  "details" : "### Overview\nVersions after and including `2.3.0` are improperly validating the JWT token signature when using the `JWTValidator.verify` method.  Improper validation of the JWT token signature when not using the default Authorization Code Flow can allow an attacker to bypass authentication and authorization.\n\n### Am I affected?\nYou are affected by this vulnerability if all of the following conditions apply:\n\n- You are using `omniauth-auth0`.\n- You are using `JWTValidator.verify` method directly OR you are not authenticating using the SDK’s default Authorization Code Flow.\n\n### How to fix that?\nUpgrade to version `2.4.1`.\n\n### Will this update impact my users?\nThe fix provided in this version will not affect your users.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "omniauth-auth0"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "2.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/auth0/omniauth-auth0/security/advisories/GHSA-58r4-h6v8-jcvm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15240"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/omniauth-auth0/commit/fd3a14f4ccdfbc515d1121d6378ff88bf55a7a7a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/auth0/omniauth-auth0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/omniauth-auth0/CVE-2020-15240.yml"
  }, {
    "type" : "WEB",
    "url" : "https://rubygems.org/gems/omniauth-auth0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-10-27T19:10:29Z",
    "nvd_published_at" : "2020-10-21T18:15:00Z"
  }
}