CVE-2026-144408 is a high-severity (CVSS 7.2) Cross-site Scripting (XSS) vulnerability in vue-i18n. A fix is available for vue-i18n — see the affected versions and patch details below.
Vue I18n: sanitizeTranslatedHtml bypass via unterminated attribute values
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
vue-i18n📦vue-i18n📦vue-i18n📦vue-i18n📦petite-vue-i18n📦petite-vue-i18n📦petite-vue-i18n📦petite-vue-i18n+16 moreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
Summary
When escapeParameter is enabled (escapeParameterHtml in the Legacy API), Vue I18n passes the translated string through sanitizeTranslatedHtml(). The sanitizer disables javascript: URLs by rewriting them to about:blank — but only for attributes it can recognize. Both recognition passes require a well-formed attribute: the quoted pass needs the closing quote inside the message, and the unquoted pass rejects any value that starts with a quote character. A message that opens an attribute value and never closes it therefore keeps its javascript: URL verbatim.
The HTML tokenizer, however, does not stop at the end of the message. In server-side rendering the unterminated attribute value continues into the rest of the page and closes at the next " in the application's own markup; the element is then emitted with the attacker's javascript: URL as its src/href. A // inside the URL comments out the swallowed page content, so the executed script is exactly attacker-controlled. An <iframe src="javascript:..."> runs without any user interaction, in the origin of the application.
Affected component
sanitizeTranslatedHtml()inpackages/shared/src/sanitize.ts- quoted-attribute pass:
packages/shared/src/sanitize.tsL139-148 (/([\w:-]+)\s*=\s*"([^"]*)"/grequires a closing quote) - unquoted-attribute pass:
packages/shared/src/sanitize.tsL186-189 (value class[^\s"'=<>]+cannot match a value starting with"`)
- quoted-attribute pass:
- Sanitization is applied to every translation result when
escapeParameteris on:packages/core-base/src/translate.tsL715-717. - Verified against the released sanitizer at v11.4.18 (the version that fixed GHSA-jrxq-gc2q-9357) and master v12.0.0-alpha.9 (c528b8d) — the relevant regexes are identical in both.
- Affected packages:
vue-i18n,petite-vue-i18n,@intlify/core-base,@intlify/core,@intlify/vue-i18n-core,@intlify/shared(same versions as GHSA-jrxq-gc2q-9357). - Not affected: client-side-only rendering (
innerHTMLof a lone message string drops the unterminated tag token at EOF — verified with parse5), and<i18n-t>(does not render translations as HTML).
PoC
Message (attacker-controlled translation, escapeParameter: true):
<iframe src="javascript:alert(document.domain)//
No closing quote. sanitizeTranslatedHtml() returns the string byte-identical (verified with an exact replica of the released code for v11.4.18 and v12.0.0-alpha.9):
import { createSSRApp, h } from 'vue'
import { renderToString } from 'vue/server-renderer'
import { createI18n } from 'vue-i18n'
const i18n = createI18n({
legacy: false,
locale: 'en',
escapeParameter: true,
messages: { en: { hello: '<iframe src="javascript:alert(document.domain)//' } }
})
const app = createSSRApp({
render: () => h('div', { innerHTML: i18n.global.t('hello') })
})
app.use(i18n)
console.log(await renderToString(app))
// the iframe start tag is still unterminated; the server continues writing the page
On the server, the rest of the page (footer, class="...", scripts) follows. In a browser, the tokenizer keeps src open across the page boundary and closes it at the next "; the element is emitted with src="javascript:alert(document.domain)//</div><footer class=" and the // comments out the swallowed content — alert(document.domain) runs in the application origin when the iframe loads, with no user interaction. Verified with parse5 (spec-compliant HTML parser):
PAGE PARSE: div -> {id="app"}
iframe -> {src="javascript:alert(document.domain)//</div><foo", footer"=""}
The click-required variant is <a href="javascript:alert(document.domain)// (same mechanism, anchor emitted with the javascript: URL).
Note: the srcdoc and event-handler neutralizations are string-wide and DO apply to unterminated values (an unterminated <iframe srcdoc="<img src=x onerror=alert(1)// gets its inner onerror neutralized to onerror, and character references are not decoded in attribute names per WHATWG §13.2.5.32), so the javascript:-URL attribute is the surviving vector.
Impact
Applications that enable escapeParameter, render translations as HTML on the server (v-html/innerHTML in SSR, Nuxt, pre-rendered pages), and contain message content that is not fully trusted (crowdsourced or stored translations) are affected. An attacker who can change such a message runs script in the origin of the application for every visitor of a page that shows the message (stored XSS), without any user interaction, despite the sanitizer — the exact impact model of GHSA-jrxq-gc2q-9357.
Suggested CVSS 3.1
7.2 — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N (same vector as GHSA-jrxq-gc2q-9357)
Suggested fix
Detect unterminated attribute values at the end of sanitization and neutralize them, e.g. escape the < of any start tag whose quoted attribute value is still open at end of string (/<(?=[^<]*=[^"]*"(?:[^"]*)*$)/-class detection, or track quote parity while scanning), so the element degrades to text exactly like the <script>/<base>/<animate>/<set> neutralization. A robust alternative is to tokenize with a spec-compliant HTML tokenizer and re-serialize instead of regex passes. Add test cases for unclosed " and ' attribute values in packages/shared/test/sanitize.test.ts (58 existing cases, none cover unterminated values).
Dedup
- Not any of the 9 published advisories. GHSA-jrxq-gc2q-9357 (SSR
<script>), GHSA-473g-cvf6-mfxj (xlink:href/animate/set), GHSA-83rm-6c8r-g728 (srcdoc) are element/attribute-name specific; this is a value-shape (unterminated attribute) bypass with a distinct root cause. - The private-security fork merges b27a50e (Nov 1 → 11.4.17) and a66ace0 (Nov 3 → 11.4.18) did not modify the quoted- or unquoted-attribute URL passes; their diffs are fully accounted for by the two published advisories.
- Distinct from GHSA-8rc2-428q-7ww3 (escaping gap in
escapeParams), CVE-2025-53892 (pre-sanitizer era), and the prototype-pollution advisories.
Patches
Fixed in vue-i18n 11.4.19 and 12.0.0-alpha.10, and in the same versions of petite-vue-i18n, @intlify/core-base, @intlify/core, @intlify/vue-i18n-core and @intlify/shared.
sanitizeTranslatedHtml() now reads tags and attributes with the rules of the HTML tokenizer, so that it agrees with browsers on where each attribute starts and ends, and it checks every attribute of every start tag. A tag, a comment, or an element like <textarea> that is not closed at the end of a translation is turned into text, so that it cannot take in the rest of the page when the HTML is rendered on the server.
v9 and v10 are not supported, and do not get a fix.
Workarounds
Do not render translation messages from untrusted sources with v-html, even with escapeParameter enabled. Use Component interpolation instead.
Related
- GHSA-7356-3q55-jvxm, which is fixed by the same change
- HTML Message - Using the escape parameter option
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | vue-i18n | all versions | No fix |
| 📦npm | vue-i18n | all versions | No fix |
| 📦npm | vue-i18n | ≥ 11.1.10&&< 11.4.19 | 11.4.19npm install vue-i18n@11.4.19 |
| 📦npm | vue-i18n | ≥ 12.0.0-alpha.4&&< 12.0.0-alpha.10 | 12.0.0-alpha.10npm install vue-i18n@12.0.0-alpha.10 |
| 📦npm | petite-vue-i18n | all versions | No fix |
| 📦npm | petite-vue-i18n | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for vue-i18n, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
A fix is available for CVE-2026-144408; check the affected-versions list above or the advisory for the patched release of vue-i18n, then make sure no transitive dependency still pins the vulnerable range.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is rated Moderate because exploitation requires specific preconditions, including server-side rendering (SSR) of translation templates with parameter escaping enabled and attacker-controlled input containing unclosed HTML attributes. Client-side fragment rendering and standard static text output are…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2026-144408 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-144408 in your dependencies?
Find it across npm, including transitive dependencies.