Persistent Cross-site Scripting - SlaPolicy Module - Settingss in yetiforcecompany/yetiforcecrm
Reported on
Aug 19th 2022
Description
The application uses Purifier to avoid the Cross Site Scripting attack. However, On SlaPolicy module from Settings, the type of recordModel->name parameter is "Text" but it is not validated and it's used directly without any encoding or validation on SlaPolicy/EditViewBlocks.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 SlaPolicy Module (Add) via the following URL:
https://gitstable.yetiforce.com/index.php?module=SlaPolicy&parent=Settings&view=Edit- Or Access the SlaPolicy Module (Edit) via the following URL:
https://gitstable.yetiforce.com/index.php?module=SlaPolicy&parent=Settings&view=Edit&record={id}- 3- Access the first URL or Change the {id} of the second URL with the valid recordID. Change the value of "name" parameter with the following payload:
SlaPolicy" onfocus="alert(document.domain)" autofocus ""="
**Inject the payload
PoC Video
https://drive.google.com/file/d/1n9KjI-B315MeJ39rt0N9lc4nl0f-3pW7/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/e55886781509fe39951fc7528347696474a17884#diff-c97e017ca1714bc40f3639b350be90ad65fd808513b4c8b61bcef7afa52dc0a1