CVE-2025-25202:Ash Authentication令牌撤销检查逻辑漏洞
漏洞概述
Ash Authentication库在通过mix ash_authentication.install生成的action中存在有缺陷的令牌撤销检查逻辑。该漏洞会导致已撤销的令牌在过期前仍可被验证为有效。
影响范围
受影响版本:>= 4.1.0, < 4.4.9
修复版本:4.4.9
仅影响使用新版igniter安装程序(自AshAuthentication v4.1.0起)引导的应用程序,且使用了以下功能:
- 魔术链接策略
- 密码重置功能
- 确认附加组件
- 手动撤销令牌
影响分析
对于不同用户群体的具体影响:
- 魔术链接策略用户:魔术链接令牌在过期前可重复使用(默认有效期为10分钟)
- 密码策略中的密码重置用户:密码重置令牌在过期前可重复使用(默认有效期为3天)
- 确认附加组件用户:确认令牌在过期前可重复使用(默认有效期为3天)
修复方案
官方补丁
该漏洞已在版本4.4.9中修复,升级时会显示编译时警告并提供修复说明。
自动升级:
mix igniter.upgrade ash_authentication
手动升级:
mix ash_authentication.upgrade 4.4.8 4.4.9
代码修复要求
需要修改:revoked? action:
:jti和:token参数必须允许nil值- action必须返回
:boolean类型
修复示例:
action :revoked?, :boolean dodescription "Returns true if a revocation token is found for the provided token"argument :token, :string, sensitive?: trueargument :jti, :string, sensitive?: truerun AshAuthentication.TokenResource.IsRevoked
end
临时解决方案
- 删除生成的
:revoked?通用action:这将使其使用AshAuthentication内部始终正确的实现 - 手动应用上述代码更改
安全评分
CVSS评分:6.3(中危)
EPSS评分:0.066%(20百分位)
参考信息
- GitHub Advisory:GHSA-qrm9-f75w-hg4c
- 修复提交:team-alembic/ash_authentication@2dee552
- NVD详情:https://nvd.nist.gov/vuln/detail/CVE-2025-25202
- 讨论渠道:Ash Discord的#ash_authentication频道
更多精彩内容 请关注我的个人公众号 公众号(办公AI智能小助手)
对网络安全、黑客技术感兴趣的朋友可以关注我的安全公众号(网络安全技术点滴分享)
公众号二维码

公众号二维码
