Headline
CVE-2022-0526: Cross-site Scripting (XSS) - Stored in chatwoot
Cross-site Scripting (XSS) - Stored in Maven org.webjars.npm:github-com-chatwoot-chatwoot prior to 2.2.0.
Title
Stored XSS in custom_attributes
Description
Relying on frontend URI check without verifying it on the backend allows to inject arbitrary JS code.
Steps to reproduce
1. Create a custom attribute, set its type to
Link2. Navigate to any conversation, click on the right sidebar.
3. Add a custom attribute, set its value to any valid URI.
4. While intercepting traffic save a new value, observe an outcoming request to
/api/v1/accounts/2/conversations/1/custom_attributes5. In
POSTrequest’s body use something like:{ "custom_attributes":{ "{yourAttributesName}":"javascript:alert(document.domain)" } }
- 6. Click on the link, trigger an XSS.
Note: it works in Safari and Firefox, not Chrome
Proof of Concept
Video PoC
Impact
This vulnerability is capable of running arbitrary JS code.