CVE-2026-65841: Jodit Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-45qg-252v-3f7p
CWE-80
Published
Advisory Summary

CVE-2026-65841 is a MODERATE cross-site scripting vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Jodit libraries in the npm ecosystem. The issue involves jodit has cross-site scripting (xss) via <script> nested in svg that bypasses clean-html sanitization. Remediation is available by upgrading affected packages to version 4.13.6.

CVE-2026-65841 at a Glance

CVE Identifier CVE-2026-65841
GHSA Identifier GHSA-45qg-252v-3f7p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Affected Product Jodit
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-65841

To remediate this vulnerability, upgrade all affected Jodit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jodit fixed: 4.13.6
npm install jodit@4.13.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls jodit

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-65841, inspect your project dependencies using npm:

npm ls jodit

Analyze the terminal output to locate any version of Jodit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.13.6), your application is affected.

Note: The npm ls jodit command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Jodit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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. 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 <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 124 124"> <rect width="124" height="124" rx="24" fill="#000000"></rect> <script type="text/javascript">alert(document.domain);</script> </svg> ``` Load the payload into the editor (e.g. via source mode) and the `<script>` 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).

CVE-2026-65841 Affected Jodit Versions

1 component(s)
Fixed Versions:
4.13.6
Product / Package Ecosystem Affected Versions Fixed Version
jodit
npm
< 4.13.6
4.13.6

References

Frequently Asked Questions

What is CVE-2026-65841?
CVE-2026-65841 is a security vulnerability in Jodit involving Jodit has cross-site scripting (XSS) via <script> nested in SVG that bypasses clean-html sanitization under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS).
Which Jodit versions are affected?
Affected versions include releases prior to 4.13.6 across affected packages: jodit.
What version fixes CVE-2026-65841?
Upgrading to 4.13.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jodit affected?
Yes, jodit is affected in releases prior to 4.13.6. Upgrade your dependency to 4.13.6 or later.
What CWE is associated with CVE-2026-65841?
CVE-2026-65841 is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.).
How can I check npm dependencies for CVE-2026-65841?
Run the dependency tree command: 'npm ls jodit'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-45qg-252v-3f7p",
  "modified" : "2026-07-31T19:15:57Z",
  "published" : "2026-07-31T19:15:57Z",
  "aliases" : [ "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).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "jodit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.13.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xdan/jodit/security/advisories/GHSA-45qg-252v-3f7p"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xdan/jodit/commit/49a31f451f6b686f5610022a1d4406ee85138dc5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xdan/jodit"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xdan/jodit/releases/tag/4.13.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-80" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-31T19:15:57Z",
    "nvd_published_at" : null
  }
}