GHSL-2022-030: Cross-Site Scripting (XSS) in Jodit Editor 3 - CVE-2022-23461
Jodit Editor 3 is vulnerable to cross-site scripting when pasting specially constructed HTML input. An attacker could execute JavaScript in the context of a webpage that uses the editor if a user copies and pastes attacker-controlled content.
Originally disclosed on GitHub Security Lab
Jodit Editor 3 is vulnerable to XSS attacks when pasting specially constructed input.
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
Impact
This issue may lead to XSS in any webpage that uses the editor, and users who copy-paste content from a page controlled by an attacker may be vulnerable.
What the attacker needed
Victim copies attacker-controlled content; victim pastes into Jodit editor; victim clicks 'Keep'
The fix
The maintainer created custom sanitisation functions, but a bypass was later sent, so the fix was not fully effective at the time of the report.
How it was found
- Open the provided playground page and enter the malicious HTML in the input box.
- Click 'Copy as HTML'.
- Go to the Jodit demo page.
- Paste the copied text.
- Click 'Keep'.
- Observe that the JavaScript alert executes.
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 a flaw where a website runs harmful JavaScript that an attacker supplied. Here, the editor fails to clean up pasted HTML, so a malicious image tag with an error handler runs code when pasted. This could let an attacker run code in the victim's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.