我正在使用gem omniauth
,当我将代码推送到Github时,它向我显示有关此gem安全性的警告。
CVE-2015-9284
high severity
Vulnerable versions: <= 1.9.0
Patched version: No fix
The request phase of the OmniAuth Ruby gem is vulnerable to Cross-Site Request Forgery when used as part of the Ruby on Rails framework, allowing accounts to be connected without user intent, user interaction, or feedback to the user. This permits a secondary account to be able to sign into the web application as the primary account.
但是,似乎我正在使用latest version
是否有任何可能的解决方法,还是我现在应该跳过吗?
答案 0 :(得分:2)
在omniauth/omniauth issue 960中对此进行了报告,并在PR 809 "Protect request phase against CSRF when Rails is used. "中进行了讨论
因此,我们已经实现了
omniauth-rails_csrf_protection
solution ,但是以前,我们已经让第三方OAuth提供者在他们验证了注册并将他们重定向到/auth/provider
端点之后登录。
现在这将要求它们使用CSRF令牌发布到端点,这是不可能的,因为它们位于单独的平台/系统上。是否应更新omniauth自述文件,以提及将omniauth与rails一起使用的人也应使用
omniauth-rails_csrf_protection
?
有关使用该设置的示例,请参见commit 0264706。
gem "omniauth-rails_csrf_protection"
或者... coreinfrastructure/best-practices-badge PR 1298
我不希望引入第三方填充程序来解决安全问题,但是上游omniauth仍 still 尚未修复其漏洞,这是4年前(2015年)的CVE报告。
omniauth的人们仍在讨论如何修复它,我的耐心已经筋疲力尽。
我查看了填充代码,但没有发现任何问题。这是一个允许帐户接管的漏洞,因此我认为忽略它是非常不明智的。利用它并非易事,但这是真实的。