CVE-2026-144406 is a medium-severity (CVSS 5.4) 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 escapeParameter sanitizer leaves elements open, so a translation can change how the rest of an SSR page is parsed
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-144406.
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 sanitizes the translated HTML with sanitizeTranslatedHtml(). The sanitizer reads tags in the same way as the HTML tokenizer, but it does not follow how elements open and close. An element that a translation leaves open, or an end tag that closes an element outside the translation, stays in the result.
When the page is rendered on the server (SSR), the rest of the page follows the translation in the same HTML, and the browser parses it as a part of what is still open. An unclosed <template> hides the rest of the page, and an unclosed <select> takes it in. With <object><svg>, <table><svg> or <math><mi><svg>, the rest of the page is parsed as SVG, and a later inline <script> becomes an SVG script, whose character references are decoded before it runs. Text that the page puts in such a script as data, such as " in a serialized state, can then end a JavaScript string, and run in the origin of the application.
Details
sanitizeTranslatedHtml() in packages/shared/src/sanitize.ts turns a tag, a comment, or an element whose content is text (such as <textarea>) into text when it is not closed at the end of the translation (GHSA-9qc3-h48f-7h96). Other elements are kept even when they are not closed, and end tags are kept even when they close no element of the translation.
In the HTML parser, an end tag closes an element only when the element is in scope. <object>, <table>, <template>, MathML <mi> and similar elements are boundaries of the scope, so the end tags of the element that holds the translation, and of the application after it, are ignored while they are open. <svg> inside them keeps the rest of the page in SVG until a start tag such as <div>, <p> or <span> leaves SVG.
Some shapes need no boundary:
- In a
<span>,<a>,<small>or similar element,<div><svg>or<li><svg>keeps<svg>open, because the end tag of the container is ignored while a special element such as<div>is open. - In an
<a>,</a><svg>closes the container, and opens<svg>after it. - In an SVG
<foreignObject>of the page,</span></foreignObject>closes the<foreignObject>of the page without opening any element.
An inline <script> in SVG is an SVG script. Its content is parsed as markup, so " becomes " before the script runs.
Before 11.4.21 and 12.0.0-alpha.12, such markup can also come from an interpolation parameter that is not a string, even when the messages are trusted (GHSA-4fx6-3h3f-fh66).
Rendering on the client (v-html, which uses innerHTML) is not affected: the browser parses the translation as a fragment, and closes what is open at its end.
PoC
import { createI18n } from 'vue-i18n'
const i18n = createI18n({
legacy: false,
locale: 'en',
escapeParameter: true,
messages: {
en: {
footer: '© Example<object><svg>',
greeting: 'Say "-alert(document.cookie)-" hi'
}
}
})
The footer is rendered on the server with <small v-html="t('footer')"></small>, and the page puts its translations into an inline state after the application:
<footer><small>© Example<object><svg></small></footer>
<script>window.__STATE__ = {"greeting":"Say "-alert(document.cookie)-" hi"}</script>
</small> and </footer> are ignored while <object> is open, so the <script> is parsed as an SVG script, " becomes ", and alert(document.cookie) runs in the origin of the application. This was confirmed on Chromium, Chrome and WebKit with 11.4.20 and 12.0.0-alpha.11.
Impact
Applications are affected when they render translations as HTML on the server (SSR, including SSG and prerendering) with escapeParameter enabled, and an attacker can change the translations (for example crowdsourced or stored translations), or, before 11.4.21 and 12.0.0-alpha.12, pass a parameter that is not a string.
When an inline script after the translation holds text that the attacker can change (for example the translations in a serialized state), and no element that leaves SVG (such as <div>, <p> or <span>) comes between them, the attacker can run script in the origin of the application. Otherwise, the attacker can still hide the rest of the page (<template>), take it into a <select> or an <object>, or make the inputs of a later form belong to a form that the translation opened (<form action>).
Pages rendered only on the client are not affected.
Patches
Fixed in 11.4.22 and 12.0.0-alpha.13. sanitizeTranslatedHtml() now follows how browsers open and close elements, including SVG and MathML: an end tag that closes no element of the translation is removed, the elements inside an element that an end tag closes are closed before it, and the elements that are still open at the end of the translation are closed. A <form> that the translation does not close is turned into text, and so are <foreignObject>, <desc>, <mi> and similar SVG and MathML elements outside SVG and MathML.
Well-formed translations are not changed.
v9 and v10 are no longer supported and will not be fixed. Please migrate to v11.
Workarounds
- Close every element in translations that are rendered with
v-html, and do not accept translations from untrusted sources. - Do not render translations from untrusted sources with
v-htmlon the server. Use component interpolation (<i18n-t>) instead.
Related
- GHSA-9qc3-h48f-7h96: an earlier gap in the same function for pages rendered on the server (unclosed tags)
- GHSA-4fx6-3h3f-fh66: another way to put markup into a translation, before 11.4.21 and 12.0.0-alpha.12
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.22 | 11.4.22npm install vue-i18n@11.4.22 |
| 📦npm | vue-i18n | ≥ 12.0.0-alpha.4&&< 12.0.0-alpha.13 | 12.0.0-alpha.13npm install vue-i18n@12.0.0-alpha.13 |
| 📦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-144406; 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 flaw has been rated as Moderate impact because exploitation requires Server-Side Rendering (SSR) applications to process untrusted translation strings under specific parameter escaping configurations. Client-side rendering applications deployed in Red Hat environments are not impacted by this issue. Furthermore,…
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-144406 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-144406 in your dependencies?
Find it across npm, including transitive dependencies.