Continuation: <form method="POST" action="https://0aa900d8042951e28278b0d2004900a2.web-security-academy.net/my-account/change-email"> <input type="hidden" name="email" value=”
[email protected] "> </form> <script> document.forms [0].submit(); </script> Method: The form uses the POST method to submit data to the server. Action: The action attribute specifies the URL to which the form data will be sent. In this case, it's the endpoint for changing the user's email. Hidden Input: The input element of type "hidden" includes the new email address,
[email protected] , which the attacker wants to set. Script Tag: This script automatically submits the form when the page loads. document.forms [0].submit(): This JavaScript code selects the first form on the page (in this case, the only form) and submits it immediately. User Interaction: Trick the user into clicking the link. Once the user clicks on this malicious link and the page loads, the email ID will be changed to
[email protected] without the user's knowledge. Image 15