Headline
CVE-2022-2890: Cross-site Scripting (XSS) - Stored in yetiforcecrm
Cross-site Scripting (XSS) - Stored in GitHub repository yetiforcecompany/yetiforcecrm prior to 6.4.0.
Description
The application uses Purify to avoid the Cross Site Scripting attack. However, On ApiAddress module from Settings, the customFields is not validated and it’s used directly without any encoding or validation on ApiConfigModal.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 ApiAddress Module via the following URL:
https://gitstable.yetiforce.com/index.php?module=ApiAddress&parent=Settings&view=Configuration
3- Click to the button "Configure provider",
Change the value of “map_url” parameter with the following payload:
https://www.attacker.com#"+onfocus="alert(document.domain)“+autofocus=""+”
Or change the value of “country_codes” with the following payload:
"+onfocus="alert(document.domain)“+autofocus=""+”
- **Inject the payload
PoC Video
https://drive.google.com/file/d/1Bb_-s_2ELyR87vfkhVjb0U0VThb7eOzZ/view?usp=sharing
Vulnerable Code
- 1- The CustomFields is not validated and map_url allow special characters:
- 2- The parameter is not encoded and use directly:
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
Related news
Cross-site Scripting (XSS) - Stored in GitHub repository yetiforcecompany/yetiforcecrm prior to 6.4.0.