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

Security Bug: SELF XSS - Event Editor #6851

Open
0xIapetus opened this issue Feb 10, 2024 · 1 comment
Open

Security Bug: SELF XSS - Event Editor #6851

0xIapetus opened this issue Feb 10, 2024 · 1 comment
Labels
bug good first issue Indicates a good issue for first-time contributors Security
Milestone

Comments

@0xIapetus
Copy link

0xIapetus commented Feb 10, 2024

If you have the ChurchCRM software running, please file an issue using the Report an issue in the help menu.

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

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

What browser (and version) are you running?
Firefox

What version of PHP is the server running?
8.3.2

What version of SQL Server are you running?
11.2.2

What version of ChurchCRM are you running?
5.5.0

Severity: low

Credits :
Georgios Bitounis

Description:
A self XSS was found in the ChurchCRM v.5.5.0 functionality, edit your event, where malicious JS or HTML code can be inserted in the Event Sermon field in the endpoint EventEditor.php.

The steps for the exploitation are the following :
Step 1 : Go to the EventEditor.php and create an event with whatever attributes you want and save.
Step 2 : Go to the ListEvents.php and edit your event, on the Event Sermon field, we can xss with this payload : <img src="invalid.jpg" onerror="alert('XSS')">

Create_new_event edit_tab before_edit_submission Executed

Impact:
In a Self-XSS attack, the victim of the attack unknowingly runs malicious code in their own web browser, thus exposing personal information to the attacker, a kind of vulnerability known as cross-site scripting. Self-XSS involves similar application behaviour to regular reflected XSS, however it cannot be triggered in normal ways via a crafted URL or a cross-domain request. Instead, the vulnerability is only triggered if the victim themselves submits the XSS payload from their browser.

Affected Component:
/churchcrm/EventEditor.php

Technical Details:
The vulnerability is caused by the failure of validation of user input. An attacker can insert malicious js code, allowing the attacker to steal sensitive information, hijack user sessions, or perform other malicious operations on behalf of the victim.

Proof of Concept (PoC):
<img src="invalid.jpg" onerror="alert('XSS')">

Remediation:
1.Input validation: All user input should be validated to ensure that it conforms to the expected format and does not contain any malicious code. Input validation should be performed on client-side and should be designed to detect and block any attempts to inject scripts or other malicious content.
2.Output encoding: All data that is displayed on a web page should be properly encoded to prevent script injection. Proper encoding can include HTML entity encoding, URL encoding, or JavaScript escaping, depending on the specific context and data being displayed.

@0xIapetus 0xIapetus added the bug label Feb 10, 2024
@0xIapetus 0xIapetus changed the title 3) Bug: SELF XSS 3) Security Bug: SELF XSS Feb 10, 2024
@MrClever MrClever changed the title 3) Security Bug: SELF XSS Security Bug: SELF XSS Feb 19, 2024
@MrClever MrClever changed the title Security Bug: SELF XSS Security Bug: SELF XSS - Event Editor Feb 19, 2024
Copy link

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 Mar 21, 2024
@DAcodedBEAT DAcodedBEAT removed the Stale label Mar 21, 2024
@DAcodedBEAT DAcodedBEAT added the good first issue Indicates a good issue for first-time contributors label Apr 3, 2024
@DAcodedBEAT DAcodedBEAT added this to the vNext (5.8.0) milestone Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Indicates a good issue for first-time contributors Security
Projects
None yet
Development

No branches or pull requests

2 participants