I'm developing a web API. authentication is through cookies. All endpoints receive parameters through JSON
in the request body.
Do I need to implement a CSRF token
to protect them?
How can this be exploitable? Is it possible to send JSON through a normal <form>
element?
Is it possible for an attacker to have something like this?
<form type="application/json" method="POST">
<input name="json" value="{ my json code here }">
<input type="submit">Send</input>
<form>