Summary. Jodit, a widely used open-source WYSIWYG editor, runs an HTML sanitizer that blocks dangerous URL schemes such as javascript: on a fixed list of URL-bearing attributes. SVG SMIL animation elements (<animate> and <set>) are allowed by the default configuration, and they can set an SVG <a> element's href to javascript: at runtime through a values or to attribute. Because that value lives on the animation and not on a URL attribute, the scheme check never inspects it. The payload survives sanitization, stays in editor.value, and runs in the page origin when the user clicks the link. The static href="javascript:" form is correctly neutralised, so the sanitizer looks sound at a glance while the animated form walks straight through. It affects Jodit < 4.19.14 and is fixed in 4.19.14, tracked as GHSA-6wrw-v5gj-6xg7 (High, CWE-79).
<animate> sets the link's href to javascript: at runtime through its values attribute, which is not on that list, so the payload survives and runs in window.name's origin on click.How Jodit blocks dangerous URLs
Jodit's sanitizer removes script-bearing URLs before content is stored. In src/core/helpers/html/safe-html.ts, sanitizeHTMLElement() runs a scheme check, isDangerousUrl(), over the value of href and over a fixed list of URL-bearing attributes.
const URL_ATTRIBUTES = [
'src',
'data',
'action',
'formaction',
'poster',
'background',
'xlink:href'
];for (const name of URL_ATTRIBUTES) {
const value = attrRaw(elm, name);
if (value && isDangerousUrl(value, tagName)) {
attr(elm, name, null);
effected = true;
}
}The check itself normalises the value and rejects the usual script schemes.
function isDangerousUrl(value: string, tagName: string): boolean {
const normalized = value.replace(/[^@- ]+/g, '').toLowerCase();
if (/^(?:javascript|vbscript|livescript|mocha):/.test(normalized)) {
return true;
}
// ...
}Against a static link this works as intended. A plain <a href="javascript:alert(1)"> or its xlink:href form is caught by this scheme check and the attribute is dropped.
Root cause
The scheme check only ever looks at attributes that hold a URL directly. SVG offers a second way to set one. SMIL animation elements can rewrite an attribute on their target element over time, and the value they write lives on the animation element, in its values, to, from or by attribute, not on the target.
Jodit's default configuration allows those animation elements. The clean-html plugin removes a short deny list of tags, and animation elements are not on it.
denyTags: 'script,iframe,object,embed',So an <animate> inside an SVG <a> reaches the stored content intact. Its attributeName is href and its values attribute carries javascript:alert(document.domain). The sanitizer walks the element and finds nothing to remove. At parse time the link's href is still empty, so its own URL attributes are clean, and none of the animation's attributes is in URL_ATTRIBUTES. Nothing on the payload matches what the check inspects, so nothing is removed.
At runtime the picture is different. The browser applies the animation, the link's animated href (a.href.animVal) becomes javascript:alert(document.domain), and a click follows it. The static form and the animated form reach the same place, a link whose href is a script URL, but only the static one is caught by the check.
Proof of concept
A default Jodit instance is enough. The content below is assigned straight to editor.value, the same way a host application loads stored HTML back into the editor.
<svg width="80" height="20">
<a>
<animate attributeName="href"
values="javascript:alert(document.domain)"
begin="0s" fill="freeze"/>
<text x="0" y="15">click here</text>
</a>
</svg>Jodit.make('#editor', {}).value = content;After sanitization the link is still there. Reading a.href.animVal returns javascript:alert(document.domain), and clicking "click here" runs it. Chromium-based browsers and Safari follow the animated href and execute the script. Firefox does not animate href this way, so it is not affected. The document.domain payload is a harmless stand-in that prints the current origin.
Impact
High. CVSS 3.1 base score 8.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N), CWE-79. An attacker who can place HTML into content that an application later loads into a Jodit editor gains script execution in that application's origin, which grants access to the victim's session and lets the attacker act as the victim. The payload also stays in the stored editor.value, so any other view that re-renders that value and supports SVG SMIL inherits the same issue. One click by any later viewer is enough.
The fix (4.19.14)
The fix extends that check so it no longer trusts the animation value attributes. In 4.19.14 the values, from, to and by attributes of <animate>, <set>, <animateMotion> and <animateTransform> go through the same isDangerousUrl() check as the static URL attributes, and an attribute whose value resolves to a javascript:, vbscript:, livescript:, mocha: or data:text/html scheme is dropped, so the animation can no longer write it.
const ANIMATION_TAGS = ['animate', 'set', 'animatemotion', 'animatetransform'];
const ANIMATION_VALUE_ATTRIBUTES = ['values', 'from', 'to', 'by'];
// The value an animation writes to its target lives here, not on a
// URL attribute, so it has to be scheme-checked on the animation itself.
if (ANIMATION_TAGS.includes(tagName)) {
for (const name of ANIMATION_VALUE_ATTRIBUTES) {
const value = attrRaw(elm, name);
if (value && isDangerousUrl(value, tagName)) {
attr(elm, name, null);
effected = true;
}
}
}Regression tests for this case live in test/tests/acceptance/security.test.js.
Remediation
Upgrade to Jodit 4.19.14 or later. If you cannot upgrade at once, add the animation elements to the clean-html deny list, for example cleanHTML.denyTags: 'script,iframe,object,embed,animate,set,animateMotion,animateTransform', or disallow <svg> in content that comes from other users. As with any rich-text editor, keep server-side output encoding on anything you store and re-render. Client-side sanitization is a usability feature, not a substitute for encoding untrusted HTML on output.
Disclosure and thanks
I reported this privately to the Jodit maintainer on 9 October 2026. They released the fix in 4.19.14 and published advisory GHSA-6wrw-v5gj-6xg7 on 12 November 2026. They were responsive and friendly throughout, took the animation-attribute angle on board right away, and shipped a clean fix with regression tests. That kind of careful, good-humoured maintenance is what makes coordinated disclosure work, and I am grateful for it. My thanks to the maintainer for the care they put into Jodit and into handling this report.
Timeline
2026-10-09: issue reported privately to the maintainer
2026-11-12: fix released in Jodit 4.19.14 and advisory GHSA-6wrw-v5gj-6xg7 published
2026-11-19: this write-up publishedReferences
- Advisory: GHSA-6wrw-v5gj-6xg7
- Fix: Jodit 4.19.14 release
- Affected code:
src/core/helpers/html/safe-html.tsandsrc/plugins/clean-html/config.ts