CVE-2019-19935 - DOM based XSS in the froala editor
The Froala editor used in the web application allows a stored cross-site scripting attack when a user switches to the code view and injects a malicious iframe with an event handler. An attacker could execute arbitrary JavaScript in the context of the victim's browser, leading to cookie theft, fake forms, or DOM rewriting.
- Triaged in under an hour
- Fixed in 17 hours
- Disclosed after 25 hours
Summary:
A stored XSS flow exist in the froala editor used in the web application.
This can be trigger by using the code view of the editor
Steps To Reproduce:
- Start a new campaign
- fill all the fieds and choose blank email template for the message
- Switch to code editor view and inject
<iframe srcdoc="<img src=x onerror=alert(document.domain)>"></iframe>

- Switch back to the normal editor view and the XSS will be trigger

See attachements.
Supporting Material/References:
Heavly inspired by the following article: https://blog.compass-security.com/2020/07/yet-another-froala-0-day-xss/
Remediation:
Unfortunately the froala editor did not provide correction for this bug yet but publish an advisory: https://www.compass-security.com/fileadmin/Datein/Research/Advisories/CSNC-2020-004_DOM_XSS_in_Froala_WYSIWYG_HTML_Editor.txt
Impact
This issue can lead to cookie stealing, creating fake form by including an iframe, DOM rewriting and so on.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
This issue can lead to cookie stealing, creating fake forms by including an iframe, DOM rewriting and so on.
What the attacker needed
Access to the Froala editor; ability to use code view
The fix
The Froala editor did not provide a correction for this bug yet, but published an advisory.
How it was found
- Start a new campaign
- Fill all the fields and choose a blank email template for the message
- Switch to the code editor view and inject an iframe with an onerror handler
- Switch back to the normal editor view and the XSS triggers
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The Froala editor is a tool that lets people write formatted text on a website. It has a 'code view' where you can type raw HTML, and it does not properly clean up dangerous HTML like an iframe with an event handler. This means an attacker can insert a script that runs when someone views the page, potentially stealing their cookies or changing what they see.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.