how to fix this vulnerability?
<input type=hidden name=target value="$$target$$">
Injection Code
Injection
<input type=hidden name=target value="https://test/ff5b27051cb9fatest" accesskey=x onclick=alert(document.location)"">
how to fix this vulnerability?
<input type=hidden name=target value="$$target$$">
Injection Code
Injection
<input type=hidden name=target value="https://test/ff5b27051cb9fatest" accesskey=x onclick=alert(document.location)"">
You are not encoding "
characters. This allows the attacker to terminate your HTML attribute (value
) and inject their own (onclick
). As others have mentioned, you should use a trusted sanitizer, but the key vulnerability as you have shown is the failure to encode quotes.