GHSA-49r3-2549-3633

Suggest an improvement
Source
https://github.com/advisories/GHSA-49r3-2549-3633
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/12/GHSA-49r3-2549-3633/GHSA-49r3-2549-3633.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-49r3-2549-3633
Aliases
Published
2020-12-08T14:18:19Z
Modified
2024-02-16T08:16:25.185804Z
Severity
  • 7.7 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N CVSS Calculator
Summary
omniauth-apple allows attacker to fake their email address during authentication
Details

Impact

This vulnerability impacts applications using the omniauth-apple strategy of OmniAuth and using the info.email field of OmniAuth's 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:

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:

module OmniAuth
  module Strategies
    class Apple
      def email
        id_info['email']
      end
    end
  end
end
Database specific
{
    "nvd_published_at": "2020-12-08T15:15:11Z",
    "cwe_ids": [
        "CWE-290"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2020-12-08T14:17:26Z"
}
References

Affected packages

RubyGems / omniauth-apple

Package

Name
omniauth-apple
Purl
pkg:gem/omniauth-apple

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.0.1

Affected versions

0.*

0.0.1
0.0.2
0.0.3

1.*

1.0.0