Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当将 http 参数设置为以下值时,我有一个安全扫描报告 XSS 漏洞。它呈现一个脚本标签
'1234'"/><img%20src%3D%26%23x6a;%26%23x61;%26%23x76;%26%23x61;%26%23x73;%26%23x63;%26%23x72;%26% 23x69;%26%23x70;% 26%23x74;%26%23x3a;警报%26%23x28;5846%26%23x29;>'
它看起来不像 html 编码或 url 编码,脚本标签是哪种编码?
如果“HTTP 参数”是指 URL 参数,则 URL 编码的八位字节%hh被解码为:
%hh
'1234'"/><img src=javascript:alert(5846)>'
如果该值被打印到将其解释为 HTML 的上下文中,&#xhh;则属性值中的字符引用将被解码为:
&#xhh;
'1234'"/><img src=javascript:alert(5846)>'