0x01 漏洞描述:
在 /index/controller/Base.php
控制器的 __construct
方法中,负责用户登录验证的逻辑存在安全隐患。该系统同时使用 Session 和 Cookie 来验证用户身份,其中关键代码为 if (!$uid) { $uid = cookie('user_id'); }
。当 Session 不存在 user_id
时,系统直接依赖 Cookie 中的 user_id
进行验证,这使得攻击者可以通过伪造 Cookie 来绕过身份验证,从而导致安全漏洞的产生。
0x02 搜索语句:
Fofa:"/red/popper.min.js"
0x03 漏洞复现:
因为该漏洞出现在co