Vulnerabilities in pkg:gem/omniauth-apple

PACKAGE
Advisory Identifier: GHSA-49r3-2549-3633
Advisory Summary

CVE-2020-26254 is a HIGH (CVSS 7.7) omniauth-apple allows attacker to fake vulnerability (CWE-290: Authentication Bypass by Spoofing) affecting Omniauth apple libraries in the RubyGems ecosystem. The issue involves omniauth-apple allows attacker to fake their email address during authentication. Remediation is available by upgrading affected packages to version 1.0.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/omniauth-apple

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-49r3-2549-3633 CVE-2020-26254 HIGH omniauth-apple allows attacker to fake their email address during authentication

CVE-2020-26254 at a Glance

CVE Identifier CVE-2020-26254
GHSA Identifier GHSA-49r3-2549-3633
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-290: Authentication Bypass by Spoofing
Affected Product Omniauth apple
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.7

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

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

How to Fix CVE-2020-26254

To remediate this vulnerability, upgrade all affected Omniauth apple 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-apple fixed: 1.0.1
Upgrade omniauth-apple to 1.0.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-apple

How to Check if You Are Affected

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

inspect dependencies for omniauth-apple

Analyze the terminal output to locate any version of Omniauth apple in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.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-290: Authentication Bypass by Spoofing, where this attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. In Omniauth apple, 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 This vulnerability impacts applications using the [omniauth-apple](https://github.com/nhosoya/omniauth-apple) strategy of OmniAuth and using the `info.email` field of OmniAuth's [Auth Hash Schema](https://github.com/omniauth/omniauth/wiki/Auth-Hash-Schema) for any kind of identification. The value of this field may be set to any value of the attacker's choice including email addresses of other users. For example, an application using omniauth-apple with the following code will be impacted: ```ruby def omniauth_callback auth_hash = request.env['omniauth.auth'] @authenticated_user = User.find_by(email: auth_hash.info.email) end ``` Applications not using `info.email` for identification but are instead using the `uid` field are not impacted in the same manner. Note, these applications may still be negatively affected if the value of `info.email` is being used for other purposes. ### Patches Applications using affected versions of omniauth-apple are advised to upgrade to omniauth-apple version 1.0.1 or later. ### Workarounds If unable to upgrade to a patched version, monkey patching `OmniAuth::Strategies::Apple#email` as follows is advised as a workaround: ```ruby module OmniAuth module Strategies class Apple def email id_info['email'] end end end end ```

CVE-2020-26254 Affected Omniauth apple Versions

1 component(s)
Fixed Versions:
1.0.1
Product / Package Ecosystem Affected Versions Fixed Version
omniauth-apple
RubyGems
< 1.0.1
1.0.1

References

Frequently Asked Questions

What is CVE-2020-26254?
CVE-2020-26254 is a security vulnerability in Omniauth apple involving omniauth-apple allows attacker to fake their email address during authentication under CWE-290: Authentication Bypass by Spoofing.
Which Omniauth apple versions are affected?
Affected versions include releases prior to 1.0.1 across affected packages: omniauth-apple.
What version fixes CVE-2020-26254?
Upgrading to 1.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is omniauth-apple affected?
Yes, omniauth-apple is affected in releases prior to 1.0.1. Upgrade your dependency to 1.0.1 or later.
What is the CVSS score of CVE-2020-26254?
CVE-2020-26254 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2020-26254?
CVE-2020-26254 is classified under CWE-290: Authentication Bypass by Spoofing (This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.).
How can I check RubyGems dependencies for CVE-2020-26254?
Run the dependency tree command: 'inspect dependencies for omniauth-apple'. 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-49r3-2549-3633",
  "modified" : "2023-05-16T16:06:03Z",
  "published" : "2020-12-08T14:18:19Z",
  "aliases" : [ "CVE-2020-26254" ],
  "summary" : "omniauth-apple allows attacker to fake their email address during authentication",
  "details" : "### Impact\n\nThis vulnerability impacts applications using the [omniauth-apple](https://github.com/nhosoya/omniauth-apple) strategy of OmniAuth and using the `info.email` field of OmniAuth's [Auth Hash Schema](https://github.com/omniauth/omniauth/wiki/Auth-Hash-Schema) for any kind of identification.  The value of this field may be set to any value of the attacker's choice including email addresses of other users.\n\nFor example, an application using omniauth-apple with the following code will be impacted:\n```ruby\ndef omniauth_callback\n    auth_hash = request.env['omniauth.auth']\n    @authenticated_user = User.find_by(email: auth_hash.info.email)\nend\n```\n\nApplications not using `info.email` for identification but are instead using the `uid` field are not impacted in the same manner.  Note, these applications may still be negatively affected if the value of `info.email` is being used for other purposes.\n\n### Patches\n\nApplications using affected versions of omniauth-apple are advised to upgrade to omniauth-apple version 1.0.1 or later.\n\n### Workarounds\n\nIf unable to upgrade to a patched version, monkey patching `OmniAuth::Strategies::Apple#email` as follows is advised as a workaround:\n\n```ruby\nmodule OmniAuth\n  module Strategies\n    class Apple\n      def email\n        id_info['email']\n      end\n    end\n  end\nend\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "omniauth-apple"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nhosoya/omniauth-apple/security/advisories/GHSA-49r3-2549-3633"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26254"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhosoya/omniauth-apple/commit/b37d5409213adae2ca06a67fec14c8d3d07d9016"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nhosoya/omniauth-apple"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nhosoya/omniauth-apple/blob/master/CHANGELOG.md#101---2020-12-03"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/omniauth-apple/CVE-2020-26254.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-12-08T14:17:26Z",
    "nvd_published_at" : "2020-12-08T15:15:11Z"
  }
}