Vulnerability library
Security checkJuly 31, 2026

Jodit has cross-site scripting (XSS) via <script> nested in SVG that bypasses clean-html sanitization

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmjodit

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

A <script> element placed directly inside an <svg> (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.

Recommendation

Update the jodit package to the latest compatible version. Followings are version details:

  • Affected version(s): < 4.13.6
  • Patched version(s): 4.13.6

References

Could your website be exposed too?

SmartScanner can check your website for Jodit has cross-site scripting (XSS) via <script> nested in SVG that bypasses clean-html sanitization and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated July 31, 2026