Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTQ5cjMtMjU0OS0zNjMz
omniauth-apple allows attacker to fake their email address during authentication
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
Permalink: https://github.com/advisories/GHSA-49r3-2549-3633JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTQ5cjMtMjU0OS0zNjMz
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 3 years ago
Updated: 6 months ago
CVSS Score: 7.7
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
Identifiers: GHSA-49r3-2549-3633, CVE-2020-26254
References:
- https://github.com/nhosoya/omniauth-apple/security/advisories/GHSA-49r3-2549-3633
- https://github.com/nhosoya/omniauth-apple/commit/b37d5409213adae2ca06a67fec14c8d3d07d9016
- https://github.com/nhosoya/omniauth-apple/blob/master/CHANGELOG.md#101---2020-12-03
- https://nvd.nist.gov/vuln/detail/CVE-2020-26254
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/omniauth-apple/CVE-2020-26254.yml
- https://github.com/advisories/GHSA-49r3-2549-3633
Blast Radius: 16.7
Affected Packages
rubygems:omniauth-apple
Dependent packages: 1Dependent repositories: 147
Downloads: 2,587,726 total
Affected Version Ranges: < 1.0.1
Fixed in: 1.0.1
All affected versions: 0.0.1, 0.0.2, 0.0.3, 1.0.0
All unaffected versions: 1.0.1, 1.0.2, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.3.0