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

Stored XSS from external family registration #7029

Open
toekhaing opened this issue May 16, 2024 · 2 comments · May be fixed by #7063
Open

Stored XSS from external family registration #7029

toekhaing opened this issue May 16, 2024 · 2 comments · May be fixed by #7063
Assignees

Comments

@toekhaing
Copy link

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.

  • ChurchCRM version: 5.8.0
  • ChurchCRM is running with docker.
  • PHP version the server running: 8.3.7
  • vulnerable parameter : Family Info
  • Severity : High
  • payload : "><img src=x onerror=alert(2)>

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:

  • Input should be validated as strictly as possible on arrival, given the kind of content that it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitized.
  • User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
@toekhaing toekhaing added the bug label May 16, 2024
@respencer
Copy link
Contributor

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

@romdricks
Copy link
Contributor

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.

@respencer respencer self-assigned this May 17, 2024
respencer added a commit to respencer/ChurchCRM that referenced this issue Jun 3, 2024
@respencer respencer linked a pull request Jun 3, 2024 that will close this issue
12 tasks
respencer added a commit to respencer/ChurchCRM that referenced this issue Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants