imgurl icon indicating copy to clipboard operation
imgurl copied to clipboard

Store Cross Site Script Attack on Upload HTTP Request Header

Open mcblog opened this issue 3 years ago • 1 comments

Hi, how is going? I test imgurl upload functions. And I found a XSS vulnarability.

First step:

Put payload on upload header : X-Forwarded-For: "><img src=# onerror=alert(/a/)>

a

微信截图_20210816093947

Second

then web administrator click

微信截图_20210816094107

微信截图_20210816094127

微信截图_20210816094207


The method to solve it:

all the request header filter special character。

过滤http请求头的所有特殊字符。

mcblog avatar Aug 16 '21 02:08 mcblog

感谢您的反馈,这应该是由于获取用户IP的时候,XFF头没有进行验证导致。我修复一下。

helloxz avatar Aug 16 '21 05:08 helloxz