Persistent Cross Site Scripting - LayoutEditor Module - Settings in yetiforcecompany/yetiforcecrm
Reported on
Aug 19th 2022
Description
The application uses Purifier to avoid the Cross Site Scripting attack. However, On LayoutEditor module from Settings, the type of fieldModel->label parameter is "Text" but it is not validated and it's used directly without any encoding or validation on LayoutEditor/EditField.tpl. It allows attacker to inject arbitrary Javascript code to perform an Stored XSS attack.
Proof of Concept
- 1- Login to the application
- 2- Access the LayoutEditor Module via the following URL:
https://gitstable.yetiforce.com/index.php?module=LayoutEditor&parent=Settings&view=Index- 3- Click to the button "Edit", Change the value of "label" parameter with the following payload:
LayoutEditor" onfocus="alert(document.domain)" autofocus ""="
**Inject the payload
PoC Video
https://drive.google.com/file/d/1TCHCCuLC_3pJ9VMaDvRWmlab58eOY8aI/view?usp=sharing
Impact
An XSS attack allows an attacker to execute arbitrary JavaScript in the context of the attacked website and the attacked user. This can be abused to steal session cookies, perform requests in the name of the victim or for phishing attacks.
Occurrences
Hi @admin, the bug has been fixed by @rskrzypczak, please help me review and publish the CVE. You can check with the following commit: https://github.com/YetiForceCompany/YetiForceCRM/commit/eebc12601495ada38495076bec12841b2477516b#diff-09030a439bec9e66dd7a588b2558d8b88ab84cf9ecf03c5de96a042f1be1b332