ChurchCRM / CRM

ChurchCRM is an OpenSource Church CRM & Management Software.
https://ChurchCRM.io
MIT License
622 stars 442 forks source link

Stored XSS from external family registration #7029

Closed toekhaing closed 4 months ago

toekhaing commented 5 months ago

Description

A stored XSS vulnerability has been found in Church CRM when the application default setting is open to register the family without the login.

Steps To Reproduce

  1. Logout your account and navigate to login page. image

  2. Click on Register a new Family and add the payload "><img src=x onerror=alert(2)> in Family name text field and register. image

  3. Login to the application (Admin or others)

  4. Navigate to Family page. (https://crm.site/v2/family) and you will get the xss alert. CRMXSS

Impact

Stored XSS attacks are even more significant in websites that require authentication. When an authenticated user visits a page with stored XSS, attackers are usually able to hijack their session and perform actions on their behalf. On some websites, such as those of financial or medical institutions, this can result in financial loss or exposure of highly sensitive data.

Remediation

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defenses:

respencer commented 5 months ago

Should fix this and most likely remove the external facing link to add a family to -- only allowing additions once logged in.

romdricks commented 5 months ago

Should fix this and most likely remove the external facing link to add a family to -- only allowing additions once logged in.

Thanks for working on the fix. Please do not remove the capability to add a family without logging in especially since content can't be restricted by user role. Feature request: creating different user roles; restricting content viewing and editing by user roles.