GHSL-2021-1005: Copy-paste XSS in Microweber text editor - CVE-2021-32856
The Microweber text editor did not sanitise HTML pasted into it, so a malicious image tag with an event handler could run script. An attacker could trick a victim into copying such content and pasting it into the editor, leading to cross-site scripting with user interaction.
Originally disclosed on GitHub Security Lab
The Microweber text editor is vulnerable to copy-paste cross-site scripting (XSS). For this particular type of XSS, the victim needs to be fooled into copying a malicious payload into the text editor.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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
Root cause
Likely the text editor did not sanitise HTML pasted into it, allowing event-handler attributes to execute script.
Impact
This issue may lead to XSS with user interaction.
What the attacker needed
Victim copies attacker-controlled HTML; victim pastes into the editor; victim is logged in to admin
The fix
It was fixed in v1.2.12, though the report notes the fix was later found incomplete.
How it was found
- Open the proof-of-concept playground page.
- Paste HTML containing an image with event handlers into the HTML input.
- Click the button to copy the content as HTML.
- Log in to the admin page and start a live-edit session.
- Open a demo page and select some text so you can write in it.
- Paste the copied content into the text editor.
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.
Cross-site scripting (XSS) is when an attacker gets their own code to run in someone else's browser on a trusted website. Here, the editor accepted pasted HTML without cleaning it, so a hidden script inside copied content could run when pasted. The victim has to be tricked into copying and pasting the malicious content.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.