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

Cross-Site Request Forgery (CSRF) vulnerability in Change Password functionality #6448

Open
gulivindala opened this issue Feb 12, 2023 · 7 comments
Assignees

Comments

@gulivindala
Copy link

gulivindala commented Feb 12, 2023

On what page in the application did you find this issue?

http://192.168.0.103/churchcrm/v2/user/2/changePassword

On what type of server is this running? Dedicated / Shared hosting? Linux / Windows?

windows/xampp

What browser (and version) are you running?

firefox

What version of PHP is the server running?

7.4.27

What version of SQL Server are you running?

7.4.27

What version of ChurchCRM are you running?

4.5.3

Severity: High

Description:

A CSRF vulnerability was discovered in the Change Password functionality of the application, which could allow an attacker to change the password of any user without their knowledge or consent. The vulnerability is due to insufficient CSRF protection on the POST request used to change the password.

Impact:

An attacker can create a malicious website or a crafted HTML email, that when accessed by a victim who is authenticated in the application, will trigger an unauthorized password change. The attacker can craft a POST request with the necessary parameters and submit it through the victim's browser, leveraging the victim's session and authentication to execute the unauthorized action.

Affected Component:

POST /churchcrm/v2/user/2/changePassword

Technical Details:

The vulnerability is caused by the lack of CSRF tokens or other CSRF protections on the POST request used to change the password. As a result, an attacker can submit a crafted POST request to the application, which will be processed by the server as a legitimate request coming from an authenticated user.

Proof of Concept (PoC):

An attacker can create a simple HTML page that will submit the following POST request to the vulnerable endpoint:

<html>
  <body>
    <form action="http://192.168.0.103/churchcrm/v2/user/2/changePassword" method="POST">
      <input type="hidden" name="NewPassword1" value="hacked123">
      <input type="hidden" name="NewPassword2" value="hacked123">
      <input type="submit" value="Submit">
    </form>
  </body>
</html>

When the victim accesses this page while being authenticated in the application, the POST request will be sent with the victim's session and authentication information, causing the victim's password to be changed to the attacker's chosen password.

Remediation:

To fix this vulnerability, the application should implement a strong CSRF protection mechanism that includes generating unique tokens for each user session and verifying those tokens on every POST request that modifies sensitive user data, such as changing passwords. Additionally, the application should avoid using GET requests to perform actions that modify state, such as changing a password, as this could expose the application to other types of attacks.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 29, 2023
@DawoudIO DawoudIO added this to the 5.1.0 milestone Nov 1, 2023
@DawoudIO DawoudIO added Security and removed Stale labels Nov 1, 2023
@DawoudIO DawoudIO self-assigned this Nov 1, 2023
@DawoudIO DawoudIO removed this from the 5.1.0 milestone Nov 5, 2023
Copy link
Contributor

github-actions bot commented Dec 6, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 6, 2023
Copy link
Contributor

This issue was closed because it has been stalled for 15 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2023
@DAcodedBEAT DAcodedBEAT reopened this Jan 17, 2024
@github-actions github-actions bot removed the Stale label Jan 18, 2024
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Feb 18, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

This issue was closed because it has been stalled for 15 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@DAcodedBEAT DAcodedBEAT removed the Stale label Sep 6, 2024
@DAcodedBEAT DAcodedBEAT reopened this Sep 6, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 7, 2024
@DAcodedBEAT DAcodedBEAT removed the Stale label Oct 8, 2024
Copy link
Contributor

github-actions bot commented Nov 9, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants