Skip to content
XSS Advisory Intermediate CVE-2022-23461

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.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

Jodit Editor 3 is vulnerable to XSS attacks when pasting specially constructed input.

ghsecuritylab, on GitHub Security Lab

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

  1. Open the provided playground page and enter the malicious HTML in the input box.
  2. Click 'Copy as HTML'.
  3. Go to the Jodit demo page.
  4. Paste the copied text.
  5. Click 'Keep'.
  6. 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.

More by ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.