Vue I18n: `escapeParameter` does not escape named values when the same call also passes a listGHSA-8rc2-428q-7ww3
Fix: intlify/vue-i18n#2680GHSA-8rc2-428q-7ww3 is a Cross-site Scripting (XSS) vulnerability in vue-i18n. A fix is available for vue-i18n — see the affected versions and patch details below.
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 GHSA-8rc2-428q-7ww3.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
vue-i18nnpm@intlify/corenpmDescription
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | vue-i18n | ≥ 9.0.0-beta.5&&< 11.4.14 | 11.4.14npm install vue-i18n@11.4.14 |
| 📦npm | vue-i18n | ≥ 12.0.0-alpha.1&&< 12.0.0-alpha.5 | 12.0.0-alpha.5npm install vue-i18n@12.0.0-alpha.5 |
| 📦npm | @intlify/core | ≥ 9.0.0-beta.10&&< 11.4.14 | 11.4.14npm install @intlify/core@11.4.14 |
| 📦npm | @intlify/core | ≥ 12.0.0-alpha.1&&< 12.0.0-alpha.5 | 12.0.0-alpha.5npm install @intlify/core@12.0.0-alpha.5 |
| 📦npm | @intlify/core-base | ≥ 9.0.0-beta.12&&< 11.4.14 | 11.4.14npm install @intlify/core-base@11.4.14 |
| 📦npm | @intlify/core-base | ≥ 12.0.0-alpha.1&&< 12.0.0-alpha.5 | 12.0.0-alpha.5npm install @intlify/core-base@12.0.0-alpha.5 |
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
Update vue-i18n to 11.4.14 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-8rc2-428q-7ww3 is resolved across your whole dependency graph.
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 as having a Moderate impact because successful exploitation demands an uncommon set of prerequisites: applications must enable parameter escaping, render translation results directly as raw HTML, and simultaneously pass untrusted user input across both positional and named arguments. In…
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 GHSA-8rc2-428q-7ww3 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-8rc2-428q-7ww3 in your dependencies?
Find it across npm, including transitive dependencies.