平台
ruby
组件
spree_auth_devise
修复版本
4.3.1
4.2.1
4.1.1
4.0.2
4.4.1
CVE-2021-41275 是 Spreeauthdevise 组件中的跨站请求伪造 (CSRF) 漏洞。该漏洞允许攻击者在用户不知情的情况下冒充用户执行操作,从而可能导致用户帐户被盗用。该漏洞影响 Spreeauthdevise 的所有版本,直到 4.4.0 版本。已发布 4.4.1 版本以解决此问题。
该 CSRF 漏洞允许攻击者利用 Spreeauthdevise 组件的身份验证功能,在用户不知情的情况下执行恶意操作。攻击者可以构造恶意的 HTTP 请求,诱骗用户点击或访问包含恶意代码的链接,从而在用户不知情的情况下修改用户帐户信息、执行敏感操作或窃取用户数据。如果 protectfromforgery 方法配置不当,且使用 :nullsession 或 :resetsession 策略,则风险更高。攻击者可能利用此漏洞完全控制受影响的应用程序。
目前没有公开的漏洞利用程序,但由于该漏洞的严重性,预计未来可能会出现。该漏洞已发布到 NVD 数据库,CISA 也已将其添加到 KEV 目录中,表明其潜在风险较高。建议尽快采取缓解措施。
Applications built with Ruby on Rails that utilize the Spree Auth Devise gem, particularly those relying on the frontend component, are at risk. Specifically, applications using default configurations or those that have not explicitly configured protectfromforgery with robust settings are highly vulnerable. Shared hosting environments where application configurations are less controllable also present a heightened risk.
• ruby / server:
# Check for Spree Auth Devise version
require 'spree_auth_devise'
puts Spree::Auth::Devise.version• ruby / server:
# Inspect application configuration for protect_from_forgery settings
# Look for configurations using :null_session or :reset_session• generic web:
# Check for suspicious requests in access logs
# Look for requests with unexpected parameters or origins
grep -i 'spree_auth_devise' /var/log/nginx/access.logdisclosure
patch
漏洞利用状态
EPSS
0.07% (23% 百分位)
CVSS 向量
缓解此漏洞的首要措施是立即升级 Spreeauthdevise 组件至 4.4.1 或更高版本。如果无法立即升级,可以考虑以下临时缓解措施:确保 protectfromforgery 方法已正确配置,并且未使用 :nullsession 或 :resetsession 策略。此外,实施严格的输入验证和输出编码,以防止跨站脚本攻击 (XSS)。监控应用程序日志,查找可疑的 CSRF 攻击尝试。在升级后,请确认通过测试用户帐户的敏感操作,以验证漏洞已成功修复。
将 spree_auth_devise gem 更新到 Spree 4.3 应用程序的 4.4.1 或更高版本,Spree 4.2 应用程序的 4.2.1 或更高版本,Spree 4.1 应用程序的 4.1.1 或更高版本,或旧版本的 4.0.1 或更高版本。或者,在 ApplicationController 或 Spree::UsersController 中将 CSRF 保护策略更改为 :exception。
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2021-41275 是 Spreeauthdevise 组件中的跨站请求伪造 (CSRF) 漏洞,允许攻击者冒充用户执行操作。
如果您正在使用 Spreeauthdevise 的版本小于或等于 4.4.0,则可能受到影响。
升级 Spreeauthdevise 组件至 4.4.1 或更高版本。
目前没有公开的漏洞利用程序,但由于其严重性,预计未来可能会出现。
请参阅 Spreeauthdevise 的官方 GitHub 仓库或相关安全公告。
上传你的 Gemfile.lock 文件,立即知道是否受影响。