CWE-83
AllowedImproper Neutralization of Script in Attributes in a Web Page
Abstraction: Variant · Status: Draft
The product does not neutralize or incorrectly neutralizes "javascript:" or other URIs from dangerous attributes within tags, such as onmouseover, onload, onerror, or style.
47 vulnerabilities reference this CWE, most recent first.
GHSA-FX6J-W5W5-H468
Vulnerability from github – Published: 2026-05-19 15:49 – Updated: 2026-07-08 17:35Summary
navigateTo() with external: true generates a server-side HTML redirect body containing a <meta http-equiv="refresh"> tag. The destination URL is only sanitized by replacing " with %22, leaving <, >, &, and ' unencoded. An attacker who can influence the URL passed to navigateTo(url, { external: true }) can break out of the content="…" attribute and inject arbitrary HTML/JavaScript that executes under the application's origin.
This is a different root cause from CVE-2024-34343 (GHSA-vf6r-87q4-2vjf), which addressed javascript: protocol bypass. The issue here is triggered by any valid URL containing >.
Impact
Applications that pass user-controlled input to navigateTo(url, { external: true }) — typically via a ?next= / ?redirect= query parameter used for post-login or "return to" flows — are vulnerable to reflected cross-site scripting. The injected script runs in the context of the application's origin during the server-rendered redirect response, before the meta-refresh fires.
Details
In packages/nuxt/src/app/composables/router.ts, the SSR redirect path builds an HTML response body with only " percent-encoded in the destination URL:
const encodedLoc = location.replace(/"/g, '%22')
nuxtApp.ssrContext!['~renderResponse'] = {
status: sanitizeStatusCode(options?.redirectCode || 302, 302),
body: `<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${encodedLoc}"></head></html>`,
headers: { location: encodeURL(location, isExternalHost) },
}
The Location header is normalised through encodeURL() (which uses the URL constructor and correctly percent-encodes attribute-significant characters). The HTML body uses a narrower sanitiser. That mismatch is the root cause.
Proof of concept
Global middleware that forwards a query parameter to navigateTo:
// middleware/redirect.global.ts
export default defineNuxtRouteMiddleware((to) => {
const next = to.query.next as string | undefined
if (next) {
return navigateTo(next, { external: true })
}
})
Request:
GET /?next=https://evil.example/x><img src=x onerror=alert(document.domain)>
Response body:
<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=https://evil.example/x><img src=x onerror=alert(document.domain)>"></head></html>
The > after evil.example/x terminates the content="…" attribute, and the <img onerror> tag executes JavaScript in the application's origin before any redirect
occurs.
Patches
Fixed in nuxt@4.4.6 and nuxt@3.21.6 by #35052. The fix percent-encodes the full set of HTML-attribute-significant characters (&, ", ', <, >) before interpolating the URL into the meta-refresh body
Workarounds
If you can't upgrade immediately, validate user-controlled URLs before passing them to navigateTo(url, { external: true }). At minimum, normalise through new URL(input).toString() and reject inputs containing < or > (a normalised URL with these characters is malformed and safe to refuse).
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.21.5"
},
"package": {
"ecosystem": "npm",
"name": "nuxt"
},
"ranges": [
{
"events": [
{
"introduced": "3.4.3"
},
{
"fixed": "3.21.6"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.4.5"
},
"package": {
"ecosystem": "npm",
"name": "nuxt"
},
"ranges": [
{
"events": [
{
"introduced": "4.0.0-alpha.1"
},
{
"fixed": "4.4.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-45669"
],
"database_specific": {
"cwe_ids": [
"CWE-83"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-19T15:49:25Z",
"nvd_published_at": "2026-06-12T14:16:31Z",
"severity": "MODERATE"
},
"details": "### Summary\n`navigateTo()` with `external: true` generates a server-side HTML redirect body containing a `\u003cmeta http-equiv=\"refresh\"\u003e` tag. The destination URL is only sanitized by replacing `\"` with `%22`, leaving `\u003c`, `\u003e`, `\u0026`, and `\u0027` unencoded. An attacker who can influence the URL passed to `navigateTo(url, { external: true })` can break out of the `content=\"\u2026\"` attribute and inject arbitrary HTML/JavaScript that executes under the application\u0027s origin.\n\nThis is a different root cause from CVE-2024-34343 (GHSA-vf6r-87q4-2vjf), which addressed `javascript:` protocol bypass. The issue here is triggered by any valid URL containing `\u003e`.\n\n### Impact\nApplications that pass user-controlled input to `navigateTo(url, { external: true })` \u2014 typically via a `?next=` / `?redirect=` query parameter used for post-login or \"return to\" flows \u2014 are vulnerable to reflected cross-site scripting. The injected script runs in the context of the application\u0027s origin during the server-rendered redirect response, before the meta-refresh fires.\n\n### Details\nIn `packages/nuxt/src/app/composables/router.ts`, the SSR redirect path builds an HTML response body with only `\"` percent-encoded in the destination URL:\n\n```ts\nconst encodedLoc = location.replace(/\"/g, \u0027%22\u0027)\nnuxtApp.ssrContext![\u0027~renderResponse\u0027] = {\nstatus: sanitizeStatusCode(options?.redirectCode || 302, 302),\nbody: `\u003c!DOCTYPE html\u003e\u003chtml\u003e\u003chead\u003e\u003cmeta http-equiv=\"refresh\" content=\"0; url=${encodedLoc}\"\u003e\u003c/head\u003e\u003c/html\u003e`,\nheaders: { location: encodeURL(location, isExternalHost) },\n}\n```\n\nThe `Location` header is normalised through `encodeURL()` (which uses the `URL` constructor and correctly percent-encodes attribute-significant characters). The HTML body uses a narrower sanitiser. That mismatch is the root cause.\n\n### Proof of concept\n\nGlobal middleware that forwards a query parameter to `navigateTo`:\n\n```ts\n// middleware/redirect.global.ts\nexport default defineNuxtRouteMiddleware((to) =\u003e {\nconst next = to.query.next as string | undefined\nif (next) {\n return navigateTo(next, { external: true })\n}\n})\n```\n\nRequest:\n\n```\nGET /?next=https://evil.example/x\u003e\u003cimg src=x onerror=alert(document.domain)\u003e\n```\n\nResponse body:\n\n```html\n\u003c!DOCTYPE html\u003e\u003chtml\u003e\u003chead\u003e\u003cmeta http-equiv=\"refresh\" content=\"0; url=https://evil.example/x\u003e\u003cimg src=x onerror=alert(document.domain)\u003e\"\u003e\u003c/head\u003e\u003c/html\u003e\n```\n\nThe `\u003e` after `evil.example/x` terminates the `content=\"\u2026\"` attribute, and the `\u003cimg onerror\u003e` tag executes JavaScript in the application\u0027s origin before any redirect\noccurs.\n\n### Patches\nFixed in `nuxt@4.4.6` and `nuxt@3.21.6` by [#35052](https://github.com/nuxt/nuxt/pull/35052). The fix percent-encodes the full set of HTML-attribute-significant characters (`\u0026`, `\"`, `\u0027`, `\u003c`, `\u003e`) before interpolating the URL into the meta-refresh body\n\n### Workarounds\nIf you can\u0027t upgrade immediately, validate user-controlled URLs before passing them to `navigateTo(url, { external: true })`. At minimum, normalise through `new URL(input).toString()` and reject inputs containing `\u003c` or `\u003e` (a normalised URL with these characters is malformed and safe to refuse).",
"id": "GHSA-fx6j-w5w5-h468",
"modified": "2026-07-08T17:35:00Z",
"published": "2026-05-19T15:49:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nuxt/nuxt/security/advisories/GHSA-fx6j-w5w5-h468"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-45669"
},
{
"type": "WEB",
"url": "https://github.com/nuxt/nuxt/pull/35052"
},
{
"type": "PACKAGE",
"url": "https://github.com/nuxt/nuxt"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Nuxt: Reflected XSS in `navigateTo()` external redirect"
}
GHSA-H7R6-9754-JPV8
Vulnerability from github – Published: 2023-08-04 00:30 – Updated: 2024-04-04 06:32A security defect was identified in Foundry Frontend that enabled users to potentially conduct DOM XSS attacks if Foundry's CSP were to be bypassed.
This defect was resolved with the release of Foundry Frontend 6.225.0.
{
"affected": [],
"aliases": [
"CVE-2023-30958"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-83"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-08-03T22:15:12Z",
"severity": "MODERATE"
},
"details": "A security defect was identified in Foundry Frontend that enabled users to potentially conduct DOM XSS attacks if Foundry\u0027s CSP were to be bypassed.\n\nThis defect was resolved with the release of Foundry Frontend 6.225.0.\n\n",
"id": "GHSA-h7r6-9754-jpv8",
"modified": "2024-04-04T06:32:32Z",
"published": "2023-08-04T00:30:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-30958"
},
{
"type": "WEB",
"url": "https://palantir.safebase.us/?tcuUid=5764b094-d3c0-4380-90f2-234f36116c9b"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-J839-GQQ4-GF9J
Vulnerability from github – Published: 2026-07-31 19:08 – Updated: 2026-07-31 19:08Summary
jodit's sanitizeHTMLElement neutralizes a javascript: href using a bare href.trim().indexOf('javascript') === 0 check. This omits the normalization jodit applies to every other URL attribute: isDangerousUrl strips control bytes with value.replace(/[\u0000-\u0020]+/g, '') and lowercases the value before testing the scheme. Because the href check does neither, it is bypassed by three obfuscation classes, all confirmed firing on click against the shipped 4.12.30 build:
- Case variants:
JAVASCRIPT:,Javascript:,jaVaScRiPt:(the check is case-sensitive). - A leading C0 control byte, e.g. a
\x01prefix before lowercasejavascript:(trim()does not remove bytes in the\x00-\x08/\x0e-\x1frange, but the browser strips a leading control byte before resolving the scheme). - An embedded tab or newline inside the scheme, e.g.
java\tscript:orjava\nscript:(the browser strips tab/newline from a URL, butindexOf('javascript')sees the broken word and does not match).
The dangerous href survives editor.value = assignment and the on-change LazyWalker, persisting in the stored editor value. A victim who clicks the link in any consumer that renders the stored value (readonly editor, server-rendered page, innerHTML consumer) runs attacker-controlled JS in that page's origin.
Details
The check is in sanitizeHTMLElement at src/core/helpers/html/safe-html.ts:213:
if (safeJavaScriptLink && href && href.trim().indexOf('javascript') === 0) {
attr(elm, 'href', location.protocol + '//' + href);
effected = true;
}
href.trim() removes leading/trailing ASCII whitespace only, and indexOf('javascript') is case-sensitive and literal. So the check fails to fire whenever the scheme is upper/mixed-case, prefixed by a non-whitespace control byte, or split by an embedded tab/newline - all of which a browser still resolves to javascript: on click (URI schemes are case-insensitive per RFC 3986 section 3.1; leading control bytes, tabs and newlines are stripped from a URL during parsing).
The same file already contains the correct routine, isDangerousUrl() (line 176), used for every other URL attribute (src, data, action, formaction, poster, background, xlink:href):
function isDangerousUrl(value, tagName) {
const normalized = value.replace(/[\u0000-\u0020]+/g, '').toLowerCase();
if (/^(?:javascript|vbscript|livescript|mocha):/.test(normalized)) {
return true;
}
// ...
}
isDangerousUrl strips every control byte and ASCII space (/[\u0000-\u0020]+/g) and lowercases before testing the scheme, so it resists all three obfuscations. But href never goes through it: the attribute list isDangerousUrl is applied to (URL_ATTRIBUTES) is commented "besides href", and href is handled only by the weaker indexOf check. Both the synchronous value-set path (onBeforeSetNativeEditorValue -> safeHTML -> sanitizeHTMLElement) and the asynchronous on-change path (sanitizeAttributes -> sanitizeHTMLElement) use that same weak check.
Positive controls (filter is otherwise live): a plain lowercase javascript: href IS neutralized: jodit rewrites the value to location.protocol + '//' + href, so it reads about://javascript:... on an about:blank test page and https://javascript:... on an https page. A leading ASCII space or tab IS caught by trim(); the bypass is specific to the un-normalized forms above.
Proof of concept
Default configuration. Assign a payload to the editor and read back the stored value:
const editor = Jodit.make('#editor');
editor.value = '<a href="JAVASCRIPT:alert(document.domain)">click me</a>';
// editor.value getter returns the href unchanged:
// <p><a href="JAVASCRIPT:alert(document.domain)">click me</a></p>
document.getElementById('view').innerHTML = editor.value;
// Clicking "click me" runs alert(document.domain) in the consumer's origin.
The same persists for the leading-control-byte form (a \x01 prefix before lowercase javascript:) and the embedded-tab/newline forms (java\tscript: / java\nscript:). Verified live on the shipped es2021/jodit.min.js for jodit 4.12.30. Positive controls in the same run: <img src=x onerror=...> stripped; lowercase javascript: neutralized to location.protocol + '//' + href (about://... on the about:blank test page used here, https://... on an https page).
Impact
Stored click-XSS. An attacker with write access to an editor instance (content author, or comment author in a multi-user application) stores a crafted javascript: link. Any user who clicks it in a view that renders the stored value (readonly editor, server-rendered page, innerHTML consumer) runs attacker-controlled JS in that origin. One user interaction (the click) is required. A consumer that re-sanitizes the editor output before rendering is not affected.
Suggested fix
Route href through the existing isDangerousUrl() rather than the bespoke indexOf check. isDangerousUrl already strips control bytes and lowercases, so it closes the case, control-byte, and embedded-whitespace bypasses at once:
- if (safeJavaScriptLink && href && href.trim().indexOf('javascript') === 0) {
+ if (safeJavaScriptLink && href && isDangerousUrl(href, elm.nodeName.toLowerCase())) {
attr(elm, 'href', location.protocol + '//' + href);
effected = true;
}
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.12.30"
},
"package": {
"ecosystem": "npm",
"name": "jodit"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.12.31"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-62324"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-83"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-31T19:08:20Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Summary\n\njodit\u0027s `sanitizeHTMLElement` neutralizes a `javascript:` `href` using a bare `href.trim().indexOf(\u0027javascript\u0027) === 0` check. This omits the normalization jodit applies to every other URL attribute: `isDangerousUrl` strips control bytes with `value.replace(/[\\u0000-\\u0020]+/g, \u0027\u0027)` and lowercases the value before testing the scheme. Because the `href` check does neither, it is bypassed by three obfuscation classes, all confirmed firing on click against the shipped 4.12.30 build:\n\n1. Case variants: `JAVASCRIPT:`, `Javascript:`, `jaVaScRiPt:` (the check is case-sensitive).\n2. A leading C0 control byte, e.g. a `\\x01` prefix before lowercase `javascript:` (`trim()` does not remove bytes in the `\\x00`-`\\x08` / `\\x0e`-`\\x1f` range, but the browser strips a leading control byte before resolving the scheme).\n3. An embedded tab or newline inside the scheme, e.g. `java\\tscript:` or `java\\nscript:` (the browser strips tab/newline from a URL, but `indexOf(\u0027javascript\u0027)` sees the broken word and does not match).\n\nThe dangerous href survives `editor.value =` assignment and the on-change LazyWalker, persisting in the stored editor value. A victim who clicks the link in any consumer that renders the stored value (readonly editor, server-rendered page, `innerHTML` consumer) runs attacker-controlled JS in that page\u0027s origin.\n\n### Details\n\nThe check is in `sanitizeHTMLElement` at `src/core/helpers/html/safe-html.ts:213`:\n\n```js\nif (safeJavaScriptLink \u0026\u0026 href \u0026\u0026 href.trim().indexOf(\u0027javascript\u0027) === 0) {\n attr(elm, \u0027href\u0027, location.protocol + \u0027//\u0027 + href);\n effected = true;\n}\n```\n\n`href.trim()` removes leading/trailing ASCII whitespace only, and `indexOf(\u0027javascript\u0027)` is case-sensitive and literal. So the check fails to fire whenever the scheme is upper/mixed-case, prefixed by a non-whitespace control byte, or split by an embedded tab/newline - all of which a browser still resolves to `javascript:` on click (URI schemes are case-insensitive per RFC 3986 section 3.1; leading control bytes, tabs and newlines are stripped from a URL during parsing).\n\nThe same file already contains the correct routine, `isDangerousUrl()` (line 176), used for every other URL attribute (`src`, `data`, `action`, `formaction`, `poster`, `background`, `xlink:href`):\n\n```js\nfunction isDangerousUrl(value, tagName) {\n const normalized = value.replace(/[\\u0000-\\u0020]+/g, \u0027\u0027).toLowerCase();\n if (/^(?:javascript|vbscript|livescript|mocha):/.test(normalized)) {\n return true;\n }\n // ...\n}\n```\n\n`isDangerousUrl` strips every control byte and ASCII space (`/[\\u0000-\\u0020]+/g`) and lowercases before testing the scheme, so it resists all three obfuscations. But `href` never goes through it: the attribute list `isDangerousUrl` is applied to (`URL_ATTRIBUTES`) is commented \"besides href\", and `href` is handled only by the weaker `indexOf` check. Both the synchronous value-set path (`onBeforeSetNativeEditorValue` -\u003e `safeHTML` -\u003e `sanitizeHTMLElement`) and the asynchronous on-change path (`sanitizeAttributes` -\u003e `sanitizeHTMLElement`) use that same weak check.\n\nPositive controls (filter is otherwise live): a plain lowercase `javascript:` href IS neutralized: jodit rewrites the value to `location.protocol + \u0027//\u0027 + href`, so it reads `about://javascript:...` on an about:blank test page and `https://javascript:...` on an https page. A leading ASCII space or tab IS caught by `trim()`; the bypass is specific to the un-normalized forms above.\n\n### Proof of concept\n\nDefault configuration. Assign a payload to the editor and read back the stored value:\n\n```js\nconst editor = Jodit.make(\u0027#editor\u0027);\neditor.value = \u0027\u003ca href=\"JAVASCRIPT:alert(document.domain)\"\u003eclick me\u003c/a\u003e\u0027;\n// editor.value getter returns the href unchanged:\n// \u003cp\u003e\u003ca href=\"JAVASCRIPT:alert(document.domain)\"\u003eclick me\u003c/a\u003e\u003c/p\u003e\ndocument.getElementById(\u0027view\u0027).innerHTML = editor.value;\n// Clicking \"click me\" runs alert(document.domain) in the consumer\u0027s origin.\n```\n\nThe same persists for the leading-control-byte form (a `\\x01` prefix before lowercase `javascript:`) and the embedded-tab/newline forms (`java\\tscript:` / `java\\nscript:`). Verified live on the shipped `es2021/jodit.min.js` for jodit 4.12.30. Positive controls in the same run: `\u003cimg src=x onerror=...\u003e` stripped; lowercase `javascript:` neutralized to `location.protocol + \u0027//\u0027 + href` (`about://...` on the about:blank test page used here, `https://...` on an https page).\n\n### Impact\n\nStored click-XSS. An attacker with write access to an editor instance (content author, or comment author in a multi-user application) stores a crafted `javascript:` link. Any user who clicks it in a view that renders the stored value (readonly editor, server-rendered page, `innerHTML` consumer) runs attacker-controlled JS in that origin. One user interaction (the click) is required. A consumer that re-sanitizes the editor output before rendering is not affected.\n\n### Suggested fix\n\nRoute `href` through the existing `isDangerousUrl()` rather than the bespoke `indexOf` check. `isDangerousUrl` already strips control bytes and lowercases, so it closes the case, control-byte, and embedded-whitespace bypasses at once:\n\n```diff\n-\tif (safeJavaScriptLink \u0026\u0026 href \u0026\u0026 href.trim().indexOf(\u0027javascript\u0027) === 0) {\n+\tif (safeJavaScriptLink \u0026\u0026 href \u0026\u0026 isDangerousUrl(href, elm.nodeName.toLowerCase())) {\n \t\tattr(elm, \u0027href\u0027, location.protocol + \u0027//\u0027 + href);\n \t\teffected = true;\n \t}\n```",
"id": "GHSA-j839-gqq4-gf9j",
"modified": "2026-07-31T19:08:20Z",
"published": "2026-07-31T19:08:20Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/xdan/jodit/security/advisories/GHSA-j839-gqq4-gf9j"
},
{
"type": "WEB",
"url": "https://github.com/xdan/jodit/commit/5fba6ef2381d151d7cb8e3c5ad0b9996af0f97b0"
},
{
"type": "PACKAGE",
"url": "https://github.com/xdan/jodit"
},
{
"type": "WEB",
"url": "https://github.com/xdan/jodit/releases/tag/4.12.31"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Jodit has incomplete javascript: scheme normalization in sanitizeHTMLElement href check that allows link XSS"
}
GHSA-M2JW-CJ8V-937R
Vulnerability from github – Published: 2025-02-26 20:06 – Updated: 2025-02-26 20:06Summary
A DOM-Based XSS was discovered in copyparty, a portable fileserver. The vulnerability is considered low-risk.
Details
By handing someone a maliciously-named file, and then tricking them into dragging the file into copyparty's Web-UI, an attacker could execute arbitrary javascript with the same privileges as that user. For example, this could give unintended read-access to files owned by that user. The bug is triggered by the drag-drop action itself; it is not necessary to actually initiate the upload. The file must be empty (zero bytes).
Note: As a general-purpose webserver, it is intentionally possible to upload HTML-files with arbitrary javascript in <script> tags, which will execute when the file is opened. The difference is that this vulnerability would trigger execution of javascript during the act of uploading, and not when the uploaded file was opened.
Proof of Concept (POC)
- Create an empty file named
<img src=x onerror="alert(1)"> - Drag-and-drop the file into the browser to initiate an upload
- The
alert(1)is executed
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "copyparty"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.16.15"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-27145"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-83"
],
"github_reviewed": true,
"github_reviewed_at": "2025-02-26T20:06:56Z",
"nvd_published_at": "2025-02-25T02:15:16Z",
"severity": "LOW"
},
"details": "## Summary\n\nA [DOM-Based XSS](https://capec.mitre.org/data/definitions/588.html) was discovered in [copyparty](https://github.com/9001/copyparty), a portable fileserver. The vulnerability is considered low-risk.\n\n## Details\n\nBy handing someone a maliciously-named file, and then tricking them into dragging the file into copyparty\u0027s Web-UI, an attacker could execute arbitrary javascript with the same privileges as that user. For example, this could give unintended read-access to files owned by that user. The bug is triggered by the drag-drop action itself; it is not necessary to actually initiate the upload. The file must be empty (zero bytes).\n\nNote: As a general-purpose webserver, it is intentionally possible to upload HTML-files with arbitrary javascript in `\u003cscript\u003e` tags, which will execute when the file is opened. The difference is that this vulnerability would trigger execution of javascript during the act of uploading, and not when the uploaded file was opened.\n\n## Proof of Concept (POC)\n\n1. Create an empty file named `\u003cimg src=x onerror=\"alert(1)\"\u003e`\n2. Drag-and-drop the file into the browser to initiate an upload\n3. The `alert(1)` is executed",
"id": "GHSA-m2jw-cj8v-937r",
"modified": "2025-02-26T20:06:56Z",
"published": "2025-02-26T20:06:56Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/9001/copyparty/security/advisories/GHSA-m2jw-cj8v-937r"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-27145"
},
{
"type": "WEB",
"url": "https://github.com/9001/copyparty/commit/438ea6ccb06f39d7cbb4b6ee7ad44606e21a63dd"
},
{
"type": "PACKAGE",
"url": "https://github.com/9001/copyparty"
},
{
"type": "WEB",
"url": "https://github.com/9001/copyparty/releases/tag/v1.16.15"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "copyparty renders unsanitized filenames as HTML when user uploads empty files"
}
GHSA-RHJ6-R49H-5932
Vulnerability from github – Published: 2026-06-18 15:04 – Updated: 2026-06-18 15:04TL;DR
This vulnerability affects Kirby sites that use the writer field in any blueprint.
It was possible to include a scripting link as the target of a link (or email link). This link target would then be clickable by the user who entered it.
A successful attack commonly requires knowledge of the content structure by the attacker as well as social engineering of a user with access to the Panel. The attack cannot be automated.
In Kirby's default configuration, the vulnerability is limited to self-XSS and cannot directly affect other users or visitors of the site. Panel plugins that are directly using the <k-writer> component may also be affected by stored XSS if they don't sanitize the resulting HTML before saving it to the content.
This vulnerability is of high severity for affected sites.
Introduction
Cross-site scripting (XSS) is a type of vulnerability that allows attackers to execute any kind of JavaScript code inside the Panel session of the same or other users. In the Panel, a harmful script can, for example, trigger requests to Kirby's API with the permissions of the victim.
Self cross-site scripting (self-XSS) typically involves a user inadvertently executing malicious code within their own context, often through social engineering techniques. This can occur when a user is tricked into pasting and executing malicious JavaScript code into the browser's developer console, address bar or form fields.
In a stored XSS attack, the malicious payload is saved into the content data and has the potential to affect other users or site visitors.
Such vulnerabilities are critical if you might have potential attackers in your group of authenticated Panel users. They can escalate their privileges if they get access to the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible.
Affected components
The writer field allows users to input formatted text, including links to arbitrary URLs and email addresses. Its link and email marks are therefore a target for XSS attacks.
As the vulnerability is in the writer mark components, it also affects all uses of the <k-writer> component in Panel plugins.
Impact
In affected releases, the link and email marks did not prevent XSS payloads from being submitted to the writer field's content data:
- The
linkmark allowed users to enter JavaScript URLs using the "custom" URL type. These URLs would already be sanitized by the backend before storing the malicious link in the content file. However, the link may be clicked by the same user who entered it before the content is saved. - The
emailmark was also vulnerable to injected JavaScript URLs. However, it was not possible to perform the attack via the Panel user interface due to email validation. The attack needed to be performed via a side channel such as the browser console.
The vulnerability allows attackers to inject malicious links into content. If the authenticated user clicked such a link before saving the content, the malicious script code would then be executed in their browser.
Patches
The problem has been patched in Kirby 4.9.4 and Kirby 5.4.4. Please update to one of these or a later version to fix the vulnerability.
In all of the mentioned releases, we have added more robust validation against dangerous URL schemes that are entered in the affected writer marks.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.9.3"
},
"package": {
"ecosystem": "Packagist",
"name": "getkirby/cms"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.9.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 5.4.3"
},
"package": {
"ecosystem": "Packagist",
"name": "getkirby/cms"
},
"ranges": [
{
"events": [
{
"introduced": "5.0.0-alpha.1"
},
{
"fixed": "5.4.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-49276"
],
"database_specific": {
"cwe_ids": [
"CWE-83"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-18T15:04:41Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### TL;DR\n\nThis vulnerability affects Kirby sites that use the writer field in any blueprint.\n\nIt was possible to include a scripting link as the target of a link (or email link). This link target would then be clickable by the user who entered it.\n\nA successful attack commonly requires knowledge of the content structure by the attacker as well as social engineering of a user with access to the Panel. The attack *cannot* be automated.\n\nIn Kirby\u0027s default configuration, the vulnerability is limited to self-XSS and *cannot* directly affect other users or visitors of the site. Panel plugins that are directly using the `\u003ck-writer\u003e` component may also be affected by stored XSS if they don\u0027t sanitize the resulting HTML before saving it to the content.\n\n**This vulnerability is of high severity for affected sites.**\n\n----\n\n### Introduction\n\nCross-site scripting (XSS) is a type of vulnerability that allows attackers to execute any kind of JavaScript code inside the Panel session of the same or other users. In the Panel, a harmful script can, for example, trigger requests to Kirby\u0027s API with the permissions of the victim.\n\n*Self* cross-site scripting (self-XSS) typically involves a user inadvertently executing malicious code within their own context, often through social engineering techniques. This can occur when a user is tricked into pasting and executing malicious JavaScript code into the browser\u0027s developer console, address bar or form fields.\n\nIn a *stored* XSS attack, the malicious payload is saved into the content data and has the potential to affect other users or site visitors.\n\nSuch vulnerabilities are critical if you might have potential attackers in your group of authenticated Panel users. They can escalate their privileges if they get access to the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible.\n\n### Affected components\n\nThe `writer` field allows users to input formatted text, including links to arbitrary URLs and email addresses. Its `link` and `email` marks are therefore a target for XSS attacks.\n\nAs the vulnerability is in the writer mark components, it also affects all uses of the `\u003ck-writer\u003e` component in Panel plugins.\n\n### Impact\n\nIn affected releases, the `link` and `email` marks did not prevent XSS payloads from being submitted to the writer field\u0027s content data:\n\n- The `link` mark allowed users to enter JavaScript URLs using the \"custom\" URL type. These URLs would already be sanitized by the backend before storing the malicious link in the content file. However, the link may be clicked by the same user who entered it before the content is saved.\n- The `email` mark was also vulnerable to injected JavaScript URLs. However, it was not possible to perform the attack via the Panel user interface due to email validation. The attack needed to be performed via a side channel such as the browser console.\n\nThe vulnerability allows attackers to inject malicious links into content. If the authenticated user clicked such a link before saving the content, the malicious script code would then be executed in their browser.\n\n### Patches\n\nThe problem has been patched in [Kirby 4.9.4](https://github.com/getkirby/kirby/releases/tag/4.9.4) and [Kirby 5.4.4](https://github.com/getkirby/kirby/releases/tag/5.4.4). Please update to one of these or a [later version](https://github.com/getkirby/kirby/releases) to fix the vulnerability.\n\nIn all of the mentioned releases, we have added more robust validation against dangerous URL schemes that are entered in the affected writer marks.",
"id": "GHSA-rhj6-r49h-5932",
"modified": "2026-06-18T15:04:41Z",
"published": "2026-06-18T15:04:41Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/getkirby/kirby/security/advisories/GHSA-rhj6-r49h-5932"
},
{
"type": "PACKAGE",
"url": "https://github.com/getkirby/kirby"
},
{
"type": "WEB",
"url": "https://github.com/getkirby/kirby/releases/tag/4.9.4"
},
{
"type": "WEB",
"url": "https://github.com/getkirby/kirby/releases/tag/5.4.4"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Kirby: Self cross-site scripting (self-XSS) in the writer field"
}
GHSA-RXCW-MC6F-6HR3
Vulnerability from github – Published: 2026-07-31 19:12 – Updated: 2026-07-31 19:12Summary
jodit's built-in clean-html sanitizer can be bypassed by a MathML/<style> carrier that hides a dangerous element from the sanitizer's element walk, so a no-interaction event handler survives into the editor value. When an application supplies attacker-influenced HTML to the editor's value-set or insertion paths, the sanitized output still contains a live <img ... onload=...> (or another non-onerror handler such as onfocus). A consumer that renders that output (element.innerHTML = editor.value) executes the handler with no user interaction. This is a stored cross-site scripting vulnerability, confirmed live on the shipped es2021/jodit.min.js for 4.12.25 and the latest 4.12.27 (in Chromium via a client-side innerHTML consumer, and in Firefox via server-rendered / document-context output; see the cross-browser note under Proof of concept).
Details
The bypass exploits the order in which clean-html parses, walks, and re-serializes the value.
-
On the value-set path, the
clean-htmlplugin handles:beforeSetNativeEditorValue(src/plugins/clean-html/clean-html.ts:116), parsing the value into an inert document:sandBox.innerHTML = data.value. -
In that parse, the source nesting
math > mtext > table > mglyph > styletriggers MathML text-integration-point and foster-parenting rules: the<img>is parsed as text inside<style>(rawtext), not as an element. The<table>is foster-parented out, and the<mglyph>MathML text-integration point governs the namespace, so the<img>never becomes an element node in this parse. -
That value-set sanitizer is
safeHTML(src/core/helpers/html/safe-html.ts:24); it walks the tree but acts on elements only (theDom.isElementgate at:39) and runs against the parse-1sandBox, in which the<img>is rawtext, not an element. SoremoveAllEventAttributes(the fullon*strip atsafe-html.ts:76) has no element to clean and the handler passes through. TheonBeforeSetNativeEditorValuehandler runssafeHTMLon that parse-1 tree both before and after it captures the value, so neither pass ever sees the<img>as an element. -
The captured value (
data.value = sandBox.innerHTML) is then assigned to the editable, a second parse, which hoists the<img>out of<style>and into the HTML namespace as a live element with its handler intact. The serialize-reparse moves the element across the tree and across namespaces:
BEFORE - parse 1 (sandBox): the <img> is <style> text
<math> [MathML]
<mtext> [MathML]
<mglyph> [HTML] integration point: content parses as HTML
<style> [HTML] text "<img ... onload=...>" <-- <img> is RAWTEXT, not an element
<table> [HTML]
AFTER - editor.value (re-parsed): the <img> is hoisted OUT of <style>, live
<p> [HTML]
<math> [MathML]
<mtext> [MathML]
<mglyph> [MathML]
<style> [MathML] (now empty)
<img> [HTML] <-- hoisted out, HTML namespace, LIVE -> its handler fires
<table> [HTML]
editor.valuenow carries that live element. The value-set pass (Steps 1-4) only walked the parse-1sandBoxand never sees it; the other sanitizer, the on-change visitor (visitNodeWalkervia aLazyWalker,clean-html.ts:56/:70), does reach the hoisted element, but itssanitizeAttributesfilter callssanitizeHTMLElement(safe-html.ts:139), which stripsonerroronly - it never reads theremoveEventAttributesflagsanitizeAttributespasses it (sanitize-attributes.ts:30), so it never runs the fullon*strip. Soonload,onfocus, and every other non-onerrorhandler is never removed and persists ineditor.valuepermanently. (onerroris the one handler the cleaner removes, but only after a ~300ms window in which it too fires.)
The two code points (jodit 4.12.27):
// 1. clean-html.ts onBeforeSetNativeEditorValue - the SYNCHRONOUS value-set pass runs on the parse-1 sandBox:
sandBox.innerHTML = data.value; // :128 parse 1: the carrier hides the element as <style> rawtext
this.j.e.fire('safeHTML', sandBox); // :129 safeHTML element-walk misses the rawtext element
data.value = sandBox.innerHTML; // :130 value captured; re-parsing it into the editable hoists the element live
safeHTML(sandBox, { safeJavaScriptLink: true, removeOnError: true }); // :131 re-runs on the SAME parse-1 sandBox, never on the captured value
// 2. the ASYNC on-change filter (LazyWalker) reaches the hoisted element, but only strips onerror:
sanitizeHTMLElement(nodeElm, { /* ... */ removeEventAttributes: opts.removeEventAttributes }); // sanitize-attributes.ts:30 - passes the full-strip flag
export function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = { /* ... */ }) { // safe-html.ts:139 - never destructures removeEventAttributes
if (removeOnError && elm.hasAttribute('onerror')) attr(elm, 'onerror', null); // onerror ONLY; onload / onfocus / ... are left live
}
All four layers are required: removing any of math + the integration point, table, the mglyph slot, or the rawtext element makes jodit strip the handler (substitutes per slot are under Carrier variants).
The four-layer carrier is required only on 4.11.2 and later. jodit 4.11.2 added cleanHTML.removeEventAttributes (the value-set full on* strip); before it (all 3.x and 4.0 through 4.10.x) the sanitizer only ever removed onerror, so on those versions a plain non-onerror handler such as <img ... onload=...> survives editor.value directly with no carrier (live-confirmed on 3.24.9, 4.0.1, 4.2.27). On 4.11.2 and later, the value-set walk strips the bare handler, so the carrier is needed to hide it as <style> rawtext past that walk; and because the on-change cleaner removes only onerror (Step 5), a non-onerror hoisted handler survives across the whole range.
The bypass is not specific to the value setter. The same carrier survives clean-html through editor.value = X, editor.setEditorValue(X), and editor.s.insertHTML(X) (the API jodit's own documentation uses for plugins and custom buttons).
This is distinct from jodit's known XSS advisories: CVE-2023-42399 (GHSA-95xr-cq6h-vwr3) is an iframe[src] URL-scheme issue fixed in a 4.0.0 beta, and CVE-2022-23461 (GHSA-42hx-vrxx-5r6v) is a paste-from-Word onerror desanitization in <= 3.24.2. Neither involves this parse-1 rawtext-hoist mechanism, and a search of the issue tracker for mglyph / mathml / mutation / "value xss" finds no prior report.
Proof of concept
Default configuration. Assign the payload, read it back, render it the way a consumer would:
const editor = Jodit.make('#editor');
editor.value = '<math><mtext><table><mglyph><style><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onload=alert(document.domain)></style></mglyph></table></mtext></math>';
// editor.value (the sanitized, stored output) now contains a live handler, and it persists (onload, like any
// non-onerror handler, is not removed by jodit's on-change cleaner):
// <p><math><mtext><mglyph><style></style></mglyph>
// <img src="data:image/gif;base64,R0lGOD...AAIBRAA7" onload="alert(document.domain)">
// <table></table></mtext></math></p>
document.getElementById('view').innerHTML = editor.value; // a consumer renders the saved value
// -> the 1x1 gif loads, onload fires alert(document.domain), no interaction
Cross-browser: editor.value carries the hoisted live <img> in both Blink and Gecko, but the consumer's parse mode decides execution. Chromium fires it under both client-side element.innerHTML and document parsing; Firefox fires it only under document parsing (server-side rendering, document.write, <iframe srcdoc>), because under innerHTML Gecko leaves the <img> in the MathML namespace, inert. No iframe is required: a plain innerHTML consumer suffices in Chromium, any server-rendered consumer in Firefox.
Positive control, same run: a plain <img src=x onerror=alert(1)>, a plain <img onfocus=alert(1) autofocus tabindex=1>, and a plain <svg onload=alert(1)> are all stripped by the synchronous value-set pass to harmless output, proving clean-html is active; the same handlers pass through only when carrier-hidden as <style> rawtext, so the contrast isolates the rawtext-hiding step. (A plain <script> is a separate case - the value-set pass does not remove tags; only the async on-change cleaner removes it ~300ms later - so it is not part of this synchronous control.)
Carrier variants: three of the four layers accept substitutes: the MathML text-integration point (mtext / mi / ms / mn / mo), the integration-point child (mglyph / malignmark), and the rawtext element (style / xmp / noembed / script / plaintext; title / textarea / noscript do not work). math and table have no working substitute. The hidden element is not limited to <img>, and any non-onerror handler persists permanently. Element-name blocklisting will not close this.
Impact
Stored XSS with no user interaction, in the default configuration, on the input paths that jodit's own clean-html is responsible for sanitizing. jodit's own test suite asserts this is a sanitization boundary: src/plugins/clean-html/clean-html.test.js asserts that editor.value = '<p>test <img src="" onerror="alert(111)" alt=""></p>' sanitizes to <p>test <img src="" alt=""></p> (the onerror removed) under the default config. The carrier in this report passes that same default-config sanitizer yet keeps the handler live, defeating the asserted guarantee. A prior fix in 4.12.21 addressed a stored XSS premised on an application re-rendering editor.value as trusted HTML, so this threat model is maintainer-acknowledged. Precondition: an attacker can place HTML into the editor (a content-submission role) and the editor output is later rendered. Any integration binding value to application state in jodit-react, loading a previously stored document, or inserting content via a plugin/button will execute attacker script in the victim's page.
Suggested fix
Remove the gadget element at the source rather than re-sanitizing the output. A re-sanitize loop does not close this: nesting the carrier inside itself surfaces one level per parse, so one extra pass is bypassed at depth 2, and any fixed cap N is out-nested at depth N+2 (depth generalizes trivially). The robust fix is to drop any HTML-namespace element smuggled inside <math>/<svg> outside a spec integration point (<foreignObject>, <annotation-xml>, <desc>, <title>) during the element walk, the same approach DOMPurify's _checkValidNamespace uses. This is one pass and depth-independent. It must run on both entry points: the synchronous value-set safeHTML pass and the on-change walker (which does not call safeHTML). A regression test asserting that no on* survives a round-trip through editor.value, including the nested-carrier case, locks it in.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "jodit"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.12.28"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-58263"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-83"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-31T19:12:40Z",
"nvd_published_at": "2026-07-01T21:17:04Z",
"severity": "HIGH"
},
"details": "### Summary\njodit\u0027s built-in `clean-html` sanitizer can be bypassed by a MathML/`\u003cstyle\u003e` carrier that hides a dangerous element from the sanitizer\u0027s element walk, so a no-interaction event handler survives into the editor value. When an application supplies attacker-influenced HTML to the editor\u0027s value-set or insertion paths, the sanitized output still contains a live `\u003cimg ... onload=...\u003e` (or another non-`onerror` handler such as `onfocus`). A consumer that renders that output (`element.innerHTML = editor.value`) executes the handler with no user interaction. This is a stored cross-site scripting vulnerability, confirmed live on the shipped `es2021/jodit.min.js` for 4.12.25 and the latest 4.12.27 (in Chromium via a client-side `innerHTML` consumer, and in Firefox via server-rendered / document-context output; see the cross-browser note under Proof of concept).\n\n### Details\nThe bypass exploits the order in which `clean-html` parses, walks, and re-serializes the value.\n\n1. On the value-set path, the `clean-html` plugin handles `:beforeSetNativeEditorValue` (`src/plugins/clean-html/clean-html.ts:116`), parsing the value into an inert document: `sandBox.innerHTML = data.value`.\n\n2. In that parse, the source nesting `math \u003e mtext \u003e table \u003e mglyph \u003e style` triggers MathML text-integration-point and foster-parenting rules: the `\u003cimg\u003e` is parsed as text inside `\u003cstyle\u003e` (rawtext), not as an element. The `\u003ctable\u003e` is foster-parented out, and the `\u003cmglyph\u003e` MathML text-integration point governs the namespace, so the `\u003cimg\u003e` never becomes an element node in this parse.\n\n3. That value-set sanitizer is `safeHTML` (`src/core/helpers/html/safe-html.ts:24`); it walks the tree but acts on elements only (the `Dom.isElement` gate at `:39`) and runs against the parse-1 `sandBox`, in which the `\u003cimg\u003e` is rawtext, not an element. So `removeAllEventAttributes` (the full `on*` strip at `safe-html.ts:76`) has no element to clean and the handler passes through. The `onBeforeSetNativeEditorValue` handler runs `safeHTML` on that parse-1 tree both before and after it captures the value, so neither pass ever sees the `\u003cimg\u003e` as an element.\n\n4. The captured value (`data.value = sandBox.innerHTML`) is then assigned to the editable, a second parse, which hoists the `\u003cimg\u003e` out of `\u003cstyle\u003e` and into the HTML namespace as a live element with its handler intact. The serialize-reparse moves the element across the tree and across namespaces:\n```\nBEFORE - parse 1 (sandBox): the \u003cimg\u003e is \u003cstyle\u003e text\n \u003cmath\u003e [MathML]\n \u003cmtext\u003e [MathML]\n \u003cmglyph\u003e [HTML] integration point: content parses as HTML\n \u003cstyle\u003e [HTML] text \"\u003cimg ... onload=...\u003e\" \u003c-- \u003cimg\u003e is RAWTEXT, not an element\n \u003ctable\u003e [HTML]\n\nAFTER - editor.value (re-parsed): the \u003cimg\u003e is hoisted OUT of \u003cstyle\u003e, live\n \u003cp\u003e [HTML]\n \u003cmath\u003e [MathML]\n \u003cmtext\u003e [MathML]\n \u003cmglyph\u003e [MathML]\n \u003cstyle\u003e [MathML] (now empty)\n \u003cimg\u003e [HTML] \u003c-- hoisted out, HTML namespace, LIVE -\u003e its handler fires\n \u003ctable\u003e [HTML]\n```\n\n5. `editor.value` now carries that live element. The value-set pass (Steps 1-4) only walked the parse-1 `sandBox` and never sees it; the other sanitizer, the on-change visitor (`visitNodeWalker` via a `LazyWalker`, `clean-html.ts:56`/`:70`), does reach the hoisted element, but its `sanitizeAttributes` filter calls `sanitizeHTMLElement` (`safe-html.ts:139`), which strips `onerror` only - it never reads the `removeEventAttributes` flag `sanitizeAttributes` passes it (`sanitize-attributes.ts:30`), so it never runs the full `on*` strip. So `onload`, `onfocus`, and every other non-`onerror` handler is never removed and persists in `editor.value` permanently. (`onerror` is the one handler the cleaner removes, but only after a ~300ms window in which it too fires.)\n\nThe two code points (jodit 4.12.27):\n```js\n// 1. clean-html.ts onBeforeSetNativeEditorValue - the SYNCHRONOUS value-set pass runs on the parse-1 sandBox:\nsandBox.innerHTML = data.value; // :128 parse 1: the carrier hides the element as \u003cstyle\u003e rawtext\nthis.j.e.fire(\u0027safeHTML\u0027, sandBox); // :129 safeHTML element-walk misses the rawtext element\ndata.value = sandBox.innerHTML; // :130 value captured; re-parsing it into the editable hoists the element live\nsafeHTML(sandBox, { safeJavaScriptLink: true, removeOnError: true }); // :131 re-runs on the SAME parse-1 sandBox, never on the captured value\n\n// 2. the ASYNC on-change filter (LazyWalker) reaches the hoisted element, but only strips onerror:\nsanitizeHTMLElement(nodeElm, { /* ... */ removeEventAttributes: opts.removeEventAttributes }); // sanitize-attributes.ts:30 - passes the full-strip flag\nexport function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = { /* ... */ }) { // safe-html.ts:139 - never destructures removeEventAttributes\n if (removeOnError \u0026\u0026 elm.hasAttribute(\u0027onerror\u0027)) attr(elm, \u0027onerror\u0027, null); // onerror ONLY; onload / onfocus / ... are left live\n}\n```\n\nAll four layers are required: removing any of `math` + the integration point, `table`, the `mglyph` slot, or the rawtext element makes jodit strip the handler (substitutes per slot are under Carrier variants).\n\nThe four-layer carrier is required only on 4.11.2 and later. jodit 4.11.2 added `cleanHTML.removeEventAttributes` (the value-set full `on*` strip); before it (all 3.x and 4.0 through 4.10.x) the sanitizer only ever removed `onerror`, so on those versions a plain non-`onerror` handler such as `\u003cimg ... onload=...\u003e` survives `editor.value` directly with no carrier (live-confirmed on 3.24.9, 4.0.1, 4.2.27). On 4.11.2 and later, the value-set walk strips the bare handler, so the carrier is needed to hide it as `\u003cstyle\u003e` rawtext past that walk; and because the on-change cleaner removes only `onerror` (Step 5), a non-`onerror` hoisted handler survives across the whole range.\n\nThe bypass is not specific to the value setter. The same carrier survives clean-html through `editor.value = X`, `editor.setEditorValue(X)`, and `editor.s.insertHTML(X)` (the API jodit\u0027s own documentation uses for plugins and custom buttons).\n\nThis is distinct from jodit\u0027s known XSS advisories: CVE-2023-42399 (GHSA-95xr-cq6h-vwr3) is an `iframe[src]` URL-scheme issue fixed in a 4.0.0 beta, and CVE-2022-23461 (GHSA-42hx-vrxx-5r6v) is a paste-from-Word `onerror` desanitization in `\u003c= 3.24.2`. Neither involves this parse-1 rawtext-hoist mechanism, and a search of the issue tracker for mglyph / mathml / mutation / \"value xss\" finds no prior report.\n\n### Proof of concept\nDefault configuration. Assign the payload, read it back, render it the way a consumer would:\n```js\nconst editor = Jodit.make(\u0027#editor\u0027);\neditor.value = \u0027\u003cmath\u003e\u003cmtext\u003e\u003ctable\u003e\u003cmglyph\u003e\u003cstyle\u003e\u003cimg src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" onload=alert(document.domain)\u003e\u003c/style\u003e\u003c/mglyph\u003e\u003c/table\u003e\u003c/mtext\u003e\u003c/math\u003e\u0027;\n\n// editor.value (the sanitized, stored output) now contains a live handler, and it persists (onload, like any\n// non-onerror handler, is not removed by jodit\u0027s on-change cleaner):\n// \u003cp\u003e\u003cmath\u003e\u003cmtext\u003e\u003cmglyph\u003e\u003cstyle\u003e\u003c/style\u003e\u003c/mglyph\u003e\n// \u003cimg src=\"data:image/gif;base64,R0lGOD...AAIBRAA7\" onload=\"alert(document.domain)\"\u003e\n// \u003ctable\u003e\u003c/table\u003e\u003c/mtext\u003e\u003c/math\u003e\u003c/p\u003e\n\ndocument.getElementById(\u0027view\u0027).innerHTML = editor.value; // a consumer renders the saved value\n// -\u003e the 1x1 gif loads, onload fires alert(document.domain), no interaction\n```\nCross-browser: `editor.value` carries the hoisted live `\u003cimg\u003e` in both Blink and Gecko, but the consumer\u0027s parse mode decides execution. Chromium fires it under both client-side `element.innerHTML` and document parsing; Firefox fires it only under document parsing (server-side rendering, `document.write`, `\u003ciframe srcdoc\u003e`), because under `innerHTML` Gecko leaves the `\u003cimg\u003e` in the MathML namespace, inert. No iframe is required: a plain `innerHTML` consumer suffices in Chromium, any server-rendered consumer in Firefox.\n\nPositive control, same run: a plain `\u003cimg src=x onerror=alert(1)\u003e`, a plain `\u003cimg onfocus=alert(1) autofocus tabindex=1\u003e`, and a plain `\u003csvg onload=alert(1)\u003e` are all stripped by the synchronous value-set pass to harmless output, proving clean-html is active; the same handlers pass through only when carrier-hidden as `\u003cstyle\u003e` rawtext, so the contrast isolates the rawtext-hiding step. (A plain `\u003cscript\u003e` is a separate case - the value-set pass does not remove tags; only the async on-change cleaner removes it ~300ms later - so it is not part of this synchronous control.)\n\nCarrier variants: three of the four layers accept substitutes: the MathML text-integration point (`mtext` / `mi` / `ms` / `mn` / `mo`), the integration-point child (`mglyph` / `malignmark`), and the rawtext element (`style` / `xmp` / `noembed` / `script` / `plaintext`; `title` / `textarea` / `noscript` do not work). `math` and `table` have no working substitute. The hidden element is not limited to `\u003cimg\u003e`, and any non-`onerror` handler persists permanently. Element-name blocklisting will not close this.\n\n### Impact\nStored XSS with no user interaction, in the default configuration, on the input paths that jodit\u0027s own `clean-html` is responsible for sanitizing. jodit\u0027s own test suite asserts this is a sanitization boundary: `src/plugins/clean-html/clean-html.test.js` asserts that `editor.value = \u0027\u003cp\u003etest \u003cimg src=\"\" onerror=\"alert(111)\" alt=\"\"\u003e\u003c/p\u003e\u0027` sanitizes to `\u003cp\u003etest \u003cimg src=\"\" alt=\"\"\u003e\u003c/p\u003e` (the `onerror` removed) under the default config. The carrier in this report passes that same default-config sanitizer yet keeps the handler live, defeating the asserted guarantee. A prior fix in 4.12.21 addressed a stored XSS premised on an application re-rendering `editor.value` as trusted HTML, so this threat model is maintainer-acknowledged. Precondition: an attacker can place HTML into the editor (a content-submission role) and the editor output is later rendered. Any integration binding `value` to application state in jodit-react, loading a previously stored document, or inserting content via a plugin/button will execute attacker script in the victim\u0027s page.\n\n### Suggested fix\nRemove the gadget element at the source rather than re-sanitizing the output. A re-sanitize loop does not close this: nesting the carrier inside itself surfaces one level per parse, so one extra pass is bypassed at depth 2, and any fixed cap N is out-nested at depth N+2 (depth generalizes trivially). The robust fix is to drop any HTML-namespace element smuggled inside `\u003cmath\u003e`/`\u003csvg\u003e` outside a spec integration point (`\u003cforeignObject\u003e`, `\u003cannotation-xml\u003e`, `\u003cdesc\u003e`, `\u003ctitle\u003e`) during the element walk, the same approach DOMPurify\u0027s `_checkValidNamespace` uses. This is one pass and depth-independent. It must run on both entry points: the synchronous value-set `safeHTML` pass and the on-change walker (which does not call `safeHTML`). A regression test asserting that no `on*` survives a round-trip through `editor.value`, including the nested-carrier case, locks it in.",
"id": "GHSA-rxcw-mc6f-6hr3",
"modified": "2026-07-31T19:12:40Z",
"published": "2026-07-31T19:12:40Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/xdan/jodit/security/advisories/GHSA-rxcw-mc6f-6hr3"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-58263"
},
{
"type": "WEB",
"url": "https://github.com/xdan/jodit/commit/0ebb61692cbe84f9abf10ac76dd594dbb6343b90"
},
{
"type": "PACKAGE",
"url": "https://github.com/xdan/jodit"
},
{
"type": "WEB",
"url": "https://github.com/xdan/jodit/releases/tag/4.12.28"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Jodit Editor: Mutation XSS in jodit clean-html via a MathML/style rawtext carrier"
}
GHSA-VF6R-87Q4-2VJF
Vulnerability from github – Published: 2024-08-05 19:49 – Updated: 2025-05-15 21:26Summary
The navigateTo function attempts to blockthe javascript: protocol, but does not correctly use API's provided by unjs/ufo. This library also contains parsing discrepancies.
Details
The function first tests to see if the specified URL has a protocol. This uses the unjs/ufo package for URL parsing. This function works effectively, and returns true for a javascript: protocol.
After this, the URL is parsed using the parseURL function. This function will refuse to parse poorly formatted URLs. Parsing javascript:alert(1) returns null/"" for all values.
Next, the protocol of the URL is then checked using the isScriptProtocol function. This function simply checks the input against a list of protocols, and does not perform any parsing.
The combination of refusing to parse poorly formatted URLs, and not performing additional parsing means that script checks fail as no protocol can be found. Even if a protocol was identified, whitespace is not stripped in the parseURL implementation, bypassing the isScriptProtocol checks.
Certain special protocols are identified at the top of parseURL. Inserting a newline or tab into this sequence will block the special protocol check, and bypass the latter checks.
PoC
POC - https://stackblitz.com/edit/nuxt-xss-navigateto?file=app.vue
Attempt payload X, then attempt payload Y.
Impact
XSS, access to cookies, make requests on user's behalf.
Recommendations
As always with these bugs, the URL constructor provided by the browser is always the safest method of parsing a URL.
Given the cross-platform requirements of nuxt/ufo a more appropriate solution is to make parsing consistent between functions, and to adapt parsing to be more consistent with the WHATWG URL specification.
Note
I've reported this vulnerability here as it is unclear if this is a bug in ufo or a misuse of the ufo library.
This ONLY has impact after SSR has occurred, the javascript: protocol within a location header does not trigger XSS.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "nuxt"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.12.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-34343"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-83"
],
"github_reviewed": true,
"github_reviewed_at": "2024-08-05T19:49:22Z",
"nvd_published_at": "2024-08-05T21:15:38Z",
"severity": "MODERATE"
},
"details": "### Summary\nThe `navigateTo` function attempts to blockthe `javascript:` protocol, but does not correctly use API\u0027s provided by `unjs/ufo`. This library also contains parsing discrepancies.\n\n### Details\nThe function first tests to see if the specified [URL has a protocol](https://github.com/nuxt/nuxt/blob/fa9d43753d25fc2e8c3107f194b2bab6d4ebcb9a/packages/nuxt/src/app/composables/router.ts#L142). This uses the [unjs/ufo](https://github.com/unjs/ufo) package for URL parsing. This function works effectively, and returns true for a `javascript:` protocol.\n\nAfter this, the URL is parsed using the [`parseURL`](https://github.com/unjs/ufo/blob/e970686b2acae972136f478732450f6a2f1ab5e5/src/parse.ts#L47) function. This function will refuse to parse poorly formatted URLs. Parsing `javascript:alert(1)` returns null/\"\" for all values. \n\nNext, the protocol of the URL is then checked using the [`isScriptProtocol`](https://github.com/unjs/ufo/blob/e970686b2acae972136f478732450f6a2f1ab5e5/src/utils.ts#L74) function. This function simply checks the input against a list of protocols, and does not perform any parsing. \n\nThe combination of refusing to parse poorly formatted URLs, and not performing additional parsing means that script checks fail as no protocol can be found. Even if a protocol was identified, whitespace is not stripped in the `parseURL` implementation, bypassing the `isScriptProtocol` checks. \n\nCertain special protocols are identified at the top of [`parseURL`](https://github.com/unjs/ufo/blob/e970686b2acae972136f478732450f6a2f1ab5e5/src/parse.ts#L49). Inserting a newline or tab into this sequence will block the special protocol check, and bypass the latter checks. \n\n### PoC\nPOC - https://stackblitz.com/edit/nuxt-xss-navigateto?file=app.vue\n\nAttempt payload X, then attempt payload Y.\n\n### Impact\nXSS, access to cookies, make requests on user\u0027s behalf. \n\n### Recommendations\nAs always with these bugs, the `URL` constructor provided by the browser is always the safest method of parsing a URL. \n\nGiven the cross-platform requirements of nuxt/ufo a more appropriate solution is to make parsing consistent between functions, and to adapt parsing to be more consistent with the [WHATWG URL specification](https://url.spec.whatwg.org/).\n\n### Note\nI\u0027ve reported this vulnerability here as it is unclear if this is a bug in ufo or a misuse of the ufo library.\n\nThis ONLY has impact after SSR has occurred, the `javascript:` protocol within a location header does not trigger XSS.",
"id": "GHSA-vf6r-87q4-2vjf",
"modified": "2025-05-15T21:26:45Z",
"published": "2024-08-05T19:49:22Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nuxt/nuxt/security/advisories/GHSA-vf6r-87q4-2vjf"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-34343"
},
{
"type": "PACKAGE",
"url": "https://github.com/nuxt/nuxt"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
"type": "CVSS_V4"
}
],
"summary": "nuxt vulnerable to Cross-site Scripting in navigateTo if used after SSR"
}
Mitigation
Carefully check each input parameter against a rigorous positive specification (allowlist) defining the specific characters and format allowed. All input should be neutralized, not just parameters that the user is supposed to specify, but all data in the request, including tag attributes, hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. We often encounter data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended.
Mitigation MIT-30.1
Strategy: Output Encoding
- Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
- The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the browser to subtle XSS attacks.
Mitigation MIT-43
With Struts, write all data from form beans with the bean's filter attribute set to true.
Mitigation MIT-31
Strategy: Attack Surface Reduction
To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.
CAPEC-243: XSS Targeting HTML Attributes
An adversary inserts commands to perform cross-site scripting (XSS) actions in HTML attributes. Many filters do not adequately sanitize attributes against the presence of potentially dangerous commands even if they adequately sanitize tags. For example, dangerous expressions could be inserted into a style attribute in an anchor tag, resulting in the execution of malicious code when the resulting page is rendered. If a victim is tricked into viewing the rendered page the attack proceeds like a normal XSS attack, possibly resulting in the loss of sensitive cookies or other malicious activities.
CAPEC-244: XSS Targeting URI Placeholders
An attack of this type exploits the ability of most browsers to interpret "data", "javascript" or other URI schemes as client-side executable content placeholders. This attack consists of passing a malicious URI in an anchor tag HREF attribute or any other similar attributes in other HTML tags. Such malicious URI contains, for example, a base64 encoded HTML content with an embedded cross-site scripting payload. The attack is executed when the browser interprets the malicious content i.e., for example, when the victim clicks on the malicious link.
CAPEC-588: DOM-Based XSS
This type of attack is a form of Cross-Site Scripting (XSS) where a malicious script is inserted into the client-side HTML being parsed by a web browser. Content served by a vulnerable web application includes script code used to manipulate the Document Object Model (DOM). This script code either does not properly validate input, or does not perform proper output encoding, thus creating an opportunity for an adversary to inject a malicious script launch a XSS attack. A key distinction between other XSS attacks and DOM-based attacks is that in other XSS attacks, the malicious script runs when the vulnerable web page is initially loaded, while a DOM-based attack executes sometime after the page loads. Another distinction of DOM-based attacks is that in some cases, the malicious script is never sent to the vulnerable web server at all. An attack like this is guaranteed to bypass any server-side filtering attempts to protect users.