Live › vulnerability › CVE-2026-118257
Go to dashboardVue I18n's sanitizeTranslatedHtml() escapes markup inside an iframe srcdoc value but leaves the srcdoc attribute active, so browsers parse the value as a same-origin nested document. An attacker who controls translation content or parameters can run script in the page when the app uses escapeParameter and renders translations with v-html.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-28 19:34 UTC. All times on this page are UTC.
Applications using Vue I18n in the affected ranges that set escapeParameter and render translation output as HTML through v-html. Apps that render translations as text, or use the i18n-t component, are not affected by this issue according to the sources. Teams on the unsupported 9.x and 10.x lines are affected and have no upstream fix line.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| vue-i18n | npm | = 9.14.5 | – |
| vue-i18n | npm | = 10.0.8 | – |
| vue-i18n | npm | >= 11.1.10, < 11.4.14 | 11.4.14 |
| vue-i18n | npm | = 12.0.0-alpha.4 | 12.0.0-alpha.5 |
| petite-vue-i18n | npm | = 9.14.5 | – |
| petite-vue-i18n | npm | = 10.0.8 | – |
| petite-vue-i18n | npm | >= 11.1.10, < 11.4.14 | 11.4.14 |
| petite-vue-i18n | npm | = 12.0.0-alpha.4 | 12.0.0-alpha.5 |
| @intlify/core-base | npm | = 9.14.5 | – |
| @intlify/core-base | npm | = 10.0.8 | – |
| @intlify/core-base | npm | >= 11.1.10, < 11.4.14 | 11.4.14 |
| @intlify/core-base | npm | = 12.0.0-alpha.4 | 12.0.0-alpha.5 |
| @intlify/core | npm | = 9.14.5 | – |
| @intlify/core | npm | = 10.0.8 | – |
| @intlify/core | npm | >= 11.1.10, < 11.4.14 | 11.4.14 |
| @intlify/core | npm | = 12.0.0-alpha.4 | 12.0.0-alpha.5 |
| @intlify/vue-i18n-core | npm | = 9.14.5 | – |
| @intlify/vue-i18n-core | npm | = 10.0.8 | – |
| @intlify/vue-i18n-core | npm | >= 11.1.10, < 11.4.14 | 11.4.14 |
| @intlify/vue-i18n-core | npm | = 12.0.0-alpha.4 | 12.0.0-alpha.5 |
| @intlify/shared | npm | = 9.14.5 | – |
| @intlify/shared | npm | = 10.0.8 | – |
| @intlify/shared | npm | >= 11.1.10, < 11.4.14 | 11.4.14 |
| @intlify/shared | npm | = 12.0.0-alpha.4 | 12.0.0-alpha.5 |
vue-i18n version in package.json and the lockfile; affected ranges are 11.1.10 to before 11.4.14, 12.0.0-alpha.4 to before 12.0.0-alpha.5, and 9.14.5, 10.0.8 and earlier (unsupported)escapeParameter and for v-html used on translated strings ($t, t()vue-i18n to 11.4.14 or later on the 11.x line, or to 12.0.0-alpha.5 or later on the 12.x alpha lineEach row is the first time that source carried this signal. The analyst’s rows are its own findings.
When escapeParameter is enabled (escapeParameterHtml in the Legacy API), Vue I18n passes the translated string through sanitizeTranslatedHtml(). The sanitizer escapes < and > in attribute values and neutralizes event handler attributes such as onerror, but it does not handle the srcdoc attribute of <iframe>.
The value of srcdoc is an HTML document: the browser decodes the character references in it and parses the result as a nested document in the same origin. The escaping and the neutralization done by the sanitizer are both character references, so they are undone inside srcdoc. This bypasses the fix for CVE-2025-53892 (GHSA-x8qp-wqqm-57ph).
sanitizeTranslatedHtml() (packages/shared/src/sanitize.ts in v11.4.13) works on the final translated string:
<, >, " and ' inside quoted attribute values.on of event handler attributes to on.javascript: URLs in href, src, action and formaction with about:blank.Inside srcdoc, steps 1 and 2 only produce character references, which the browser decodes before parsing the value as a document. Markup inside srcdoc therefore survives the sanitizer, with escaping or without it.
This can be reached in three ways:
srcdoc. With a message such as <iframe srcdoc="{content}"></iframe>, escapeParameter escapes content into character references, and the browser decodes them again.<iframe srcdoc="..."> keeps it after sanitizing. The documentation asks not to use HTML messages with content from users, but it also says that the sanitizer neutralizes event handlers in the final HTML.<iframe srcdoc="..."> in a named value then reaches the sanitizer as markup, even with an ordinary message such as {0} {name}.import { createI18n } from 'vue-i18n'
const i18n = createI18n({
legacy: false,
locale: 'en',
escapeParameter: true,
messages: {
en: { message: '<iframe srcdoc="<b>x</b>"></iframe>' }
}
})
console.log(i18n.global.t('message'))
// v11.4.13: <iframe srcdoc="<b>x</b>"></iframe>
The browser decodes the value and renders <b>x</b> as a separate document inside the <iframe>, in the same origin as the page. Any markup in that position is parsed the same way.
Applications are affected when they enable escapeParameter, render translations as HTML (for example with v-html), and one of the following applies:
srcdoc,An attacker can then run script in the origin of the application (DOM-based XSS), despite the sanitizer.
Rendering through <i18n-t> is not affected, since it does not render translations as HTML.
Fixed in 11.4.14 and 12.0.0-alpha.5. The sanitizer now neutralizes the srcdoc attribute itself, in the same way as event handler attributes.
v9 and v10 are no longer supported and will not be fixed. Please migrate to v11.
v-html. Use component interpolation (<i18n-t>) instead.srcdoc in translation messages, and do not pass values into it.sanitizeTranslatedHtml()srcdoc attributeThis page as .md · .json · in your agent: get_signal("CVE-2026-118257")
NVD data is provided by NIST and is public domain · GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.