When entering
<script>alert(1)</script>
The resulting Html after submitting is
<form action="/action_page.php" novalidate>
E-mail: <input type="email" Id="user_email">"<script>alert(1)</script>
<input type="submit">
</form>
And the xss not triggered. If I replace the payload with
<img src=xss onerror=alert(1)>
Xss triggered! this xss happening with the id attribute! In browsers.
So I want to know 2 thing.
If this is a vulnerability then how an attacker can use it. I mean what payload would be used. Cause xss happening with
Id=
attributeIf this is a vulnerability. How can I fix it?
I am a beginner. I will be happy if you guys answer my question.
Thanks.