CVE-2026-118256
Vue I18n: `escapeParameter` does not escape named values when the same call also passes a list
Description
Summary
When escapeParameter is enabled (escapeParameterHtml in the Legacy API), Vue I18n escapes the interpolation parameters before formatting a message. escapeParams() escapes either the list values or the named values, but not both: the two branches are joined by else. When a single call passes both, for example t(key, ['...'], { named: { ... } }), the named values reach the message without being escaped.
Details
escapeParams() in packages/core-base/src/translate.ts (v11.4.13):
function escapeParams(options: TranslateOptions) {
if (isArray(options.list)) {
options.list = options.list.map(item => (isString(item) ? escapeHtml(item) : item))
} else if (isObject(options.named)) {
// ...escapes the named values
}
}
t(key, list, options) is a public overload, and TranslateOptions has a named field, so a call can carry both. The list is checked first, and the named values are then left as they are.
The translated string still goes through sanitizeTranslatedHtml() (added for CVE-2025-53892), which neutralizes event handler attributes and javascript: URLs. Other markup in the named values, such as links and forms, is inserted as is. Before the fix for GHSA-83rm-6c8r-g728, an <iframe srcdoc> in a named value also passes the sanitizer, and script runs. Versions without the sanitizer (before 9.14.5, 10.0.8 and 11.1.10, and 12.0.0-alpha.1 to alpha.3) insert the named values as HTML without any further check.
<i18n-t> is not affected: it passes either list or named values, never both, and it does not render translations as HTML.
PoC
import { createI18n } from 'vue-i18n'
const i18n = createI18n({
legacy: false,
locale: 'en',
escapeParameter: true,
messages: {
en: { withList: '{0} {name}', withoutList: '{name}' }
}
})
const t = i18n.global.t
t('withoutList', { name: '<b>x</b>' })
// <b>x</b> escaped
t('withList', ['a'], { named: { name: '<b>x</b>' } })
// a <b>x</b> not escaped (v11.4.13)
Impact
Applications are affected when they enable escapeParameter, render translations as HTML (for example with v-html), and pass untrusted named values in the same call as a list. The named values are inserted as markup: phishing links, forms, or layout changes. Together with GHSA-83rm-6c8r-g728, or on versions without the sanitizer, this leads to script execution (DOM-based XSS).
Patches
Fixed in 11.4.14 and 12.0.0-alpha.5. escapeParams() now escapes both the list and the named values.
The fix also stops rewriting the named object that the caller passes. Before, the values of that object were replaced with their escaped form, so a second call with the same object escaped them twice.
v9 and v10 are no longer supported and will not be fixed. Please migrate to v11.
Workarounds
- Do not pass list and named values in the same call when
escapeParameteris enabled. - Do not render translations that can contain untrusted values with
v-html. Use component interpolation (<i18n-t>) instead.
Affected Maven artifacts (4)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » vue-i18nvia npm vue-i18n | >= 9.0.0-beta.5, < 11.4.14>= 12.0.0-alpha.1, < 12.0.0-alpha.5 | 11.4.14, 12.0.0-alpha.5 |
| org.mvnpm.at.intlify » core-basevia npm @intlify/core-base | >= 9.0.0-beta.12, < 11.4.14>= 12.0.0-alpha.1, < 12.0.0-alpha.5 | 11.4.14, 12.0.0-alpha.5 |
| org.webjars.npm » intlify__core-basevia npm @intlify/core-base | >= 9.0.0-beta.12, < 11.4.14>= 12.0.0-alpha.1, < 12.0.0-alpha.5 | 11.4.14, 12.0.0-alpha.5 |
| org.webjars.npm » vue-i18nvia npm vue-i18n | >= 9.0.0-beta.5, < 11.4.14>= 12.0.0-alpha.1, < 12.0.0-alpha.5 | 11.4.14, 12.0.0-alpha.5 |
Blast radius
100% of the dependent artifacts (111) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 195 |
| 2 hops | 344 |
| 3 hops | 1,236 |
| 4 hops | 3,723 |
| 5 hops | 3,413 |
| 6 hops | 1,374 |
Most used dependents
- org.xwiki.platform » xwiki-platform-test-docker101 usages
- org.xwiki.platform » xwiki-platform-panels-ui62 usages
- org.xwiki.platform » xwiki-platform-appwithinminutes-ui31 usages
- org.xwiki.platform » xwiki-platform-livedata-macro26 usages
- org.xwiki.platform » xwiki-platform-mail-ui19 usages
- org.webjars.npm » vue-i18n19 usages
- org.xwiki.platform » xwiki-platform-index-ui16 usages
- org.xwiki.platform » xwiki-platform-user-profile-ui14 usages
- org.xwiki.platform » xwiki-platform-notifications-ui13 usages
- org.xwiki.platform » xwiki-platform-xclass-ui13 usages
- org.xwiki.platform » xwiki-platform-dashboard-ui12 usages
- org.xwiki.platform » xwiki-platform-flamingo-skin-resources11 usages
- org.xwiki.platform » xwiki-platform-tag-ui10 usages
- org.xwiki.platform » xwiki-platform-search-test-utils10 usages
- org.xwiki.platform » xwiki-platform-user-directory-ui9 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (5 packages) . See all on OSV
References
- Webhttps://github.com/intlify/vue-i18n/security/advisories/GHSA-8rc2-428q-7ww3
- Webhttps://github.com/intlify/vue-i18n/pull/2680
- Webhttps://github.com/intlify/vue-i18n/commit/d657ce8f4b3b6b198a8f6e3d09e2b57a5d019fb8
- Packagehttps://github.com/intlify/vue-i18n
- Webhttps://github.com/intlify/vue-i18n/releases/tag/v11.4.14
- Webhttps://github.com/intlify/vue-i18n/releases/tag/v12.0.0-alpha.5
