GitHub Advisoryadvisory · npm

GHSA-45qg-252v-3f7p Jodit has cross-site scripting (XSS) via <script> nested in SVG that bypasses clean-html sanitization

MEDIUM Published 2026-07-31 Modified 2026-07-31 Official page ↗
Aliases
CVE-2026-65841
Ecosystem
npm
Packages
jodit
Severity
Moderate
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weaknesses
CWE-80
Reviewed
2026-07-31

Affected packages

• npm jodit: < 4.13.6 → fixed in 4.13.6

Description

A `` element placed directly inside an `` (or MathML) container was not removed by Jodit's clean-html sanitizer. The deny/allow tag filter compared `node.nodeName` against an upper-cased tag hash, but foreign (SVG/MathML) elements preserve their original-case node names — an SVG script reports `"script"`, not `"SCRIPT"` — so the default `denyTags` list (which includes `script`) did not match it. The script therefore survived in the editor value and serialized output, where it could execute when the content was loaded back into a page or editor. Proof of concept ```html alert(document.domain); ``` Load the payload into the editor (e.g. via source mode) and the `` is preserved in `editor.value` and executes. Impact Stored / DOM cross-site scripting. An application that persists editor output and later renders or re-opens it in Jodit can have attacker-supplied script run in a victim's (e.g. an administrator's) authenticated browser context. Patch Fixed in 4.13.6: the deny/allow lookup now normalises the tag name to upper case before matching, so a foreign namespace can no longer bypass the filter, while `allowTags` is still honoured. Workaround Upgrade to 4.13.6 or later. Server-side sanitization of stored HTML mitigates in the interim. Credit Reported by Roman Kis (@CrownKingClown).

Related

Alias · CVE (1)

  • CVE-2026-65841 Jodit Editor is a WYSIWYG editor with a built-in file browser & image editor. vulnerability

Weakness · CWE (1)

  • CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page weakness

References