{"id":"CVE-2026-65841","aliases":["GHSA-45qg-252v-3f7p"],"url":"https://o3.security/vulnerability/CVE-2026-65841","summary":"Jodit has cross-site scripting (XSS) via <script> nested in SVG that bypasses clean-html sanitization","details":"A `<script>` element placed directly inside an `<svg>` (or MathML) container was not removed by Jodit's clean-html sanitizer.\n\nThe 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.\n\n### Proof of concept\n\n```html\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"400\" viewBox=\"0 0 124 124\">\n  <rect width=\"124\" height=\"124\" rx=\"24\" fill=\"#000000\"></rect>\n  <script type=\"text/javascript\">alert(document.domain);</script>\n</svg>\n```\n\nLoad the payload into the editor (e.g. via source mode) and the `<script>` is preserved in `editor.value` and executes.\n\n### Impact\n\nStored / 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.\n\n### Patch\n\nFixed 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.\n\n### Workaround\n\nUpgrade to 4.13.6 or later. Server-side sanitization of stored HTML mitigates in the interim.\n\n### Credit\n\nReported by Roman Kis (@CrownKingClown).","published":"2026-07-31T19:16:05.952Z","modified":"2026-10-28T02:30:54.461389715Z","cvss":null,"epss":{"score":0.00395,"percentile":0.33361,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"jodit","fixedVersion":"4.13.6"}],"fix":{"url":"https://github.com/xdan/jodit/commit/49a31f451f6b686f5610022a1d4406ee85138dc5","label":"xdan/jodit@49a31f4"},"references":[{"type":"WEB","url":"https://github.com/xdan/jodit/releases/tag/4.13.6"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65841.json"},{"type":"ADVISORY","url":"https://github.com/xdan/jodit/security/advisories/GHSA-45qg-252v-3f7p"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65841"},{"type":"FIX","url":"https://github.com/xdan/jodit/commit/49a31f451f6b686f5610022a1d4406ee85138dc5"},{"type":"PACKAGE","url":"https://github.com/xdan/jodit"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:54.461389715Z"}}