Vulnerability DatabaseGHSA-4fx6-3h3f-fh66

GHSA-4fx6-3h3f-fh66: 
JavaScript vulnerability analysis and mitigation

Summary

When escapeParameter is enabled (escapeParameterHtml in the Legacy API), Vue I18n escapes the interpolation parameters before it formats a message, but only the parameters that are strings. A parameter that is an array, a plain object, or another object with its own toString() is turned into text later, with JSON.stringify() or String(), and that text is not escaped. When the translation is rendered with v-html, markup in such a value becomes a part of the page. This is a gap in the same function as GHSA-8rc2-428q-7ww3.

Details

escapeParams() in packages/core-base/src/translate.ts escapes a list item or a named value only when isString(value) is true. The other values are interpolated by toDisplayString(), which uses JSON.stringify() for arrays and plain objects and String() for other values, and does not escape the result. sanitizeTranslatedHtml() still runs on the final string, so script elements, event handler attributes and javascript: URLs are neutralized. But forms, links, images, iframes and <meta http-equiv="refresh"> from such a value stay in the page. An attacker does not need the application to pass an array on purpose. For example, route.query of Vue Router returns an array when a key appears twice in the URL (?name=a&name=b). An application that passes route.query.name as a parameter, expecting a string, gets an array from a crafted link, and the value is no longer escaped.

PoC

import { createI18n } from 'vue-i18n'
const i18n = createI18n({
  legacy: false,
  locale: 'en',
  escapeParameter: true,
  messages: { en: { hello: 'Hello {name}' } }
})
console.log(i18n.global.t('hello', { name: '<b>x</b>' }))
// Hello &lt;b&gt;x&lt;&#x2F;b&gt;
console.log(i18n.global.t('hello', { name: ['<b>x</b>'] }))
// v11.4.20: Hello [\n  "<b>x</b>"\n]

Impact

Applications are affected when they enable escapeParameter, render translations as HTML (for example with v-html), and pass a value from an untrusted source that can be something other than a string, such as route.query of Vue Router, parsed JSON, or a query string parser that makes arrays or objects. An attacker can then add markup to the page: a form that sends what the user types to another site, links, images and iframes that load from another site, and a <meta http-equiv="refresh"> that moves the page to another site without any user interaction. The sanitizer still applies, so script elements and event handler attributes do not run. In pages rendered on the server (SSR), such markup can also make a later inline script run, through the gap described in GHSA-786j-gfwp-vhm5 (fixed in 11.4.22 and 12.0.0-alpha.13). Rendering through <i18n-t> is not affected, since it does not render translations as HTML.

Patches

Fixed in 11.4.21 and 12.0.0-alpha.12. With escapeParameter, a parameter that is not a string is now escaped after it is turned into text, in the same way as a string parameter. Message functions still receive the parameters as they are passed. A message function that puts a parameter that is not a string into its result should escape it. v9 and v10 are no longer supported and will not be fixed. Please migrate to v11.

Workarounds

  • Pass only strings as parameters while escapeParameter is enabled, for example String(value), and check the type of values that come from the URL or other untrusted sources.
  • Do not render translations with untrusted parameters with v-html. Use component interpolation (<i18n-t>) instead.

References


Source: NVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-133867CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/express
NoYesNov 21, 2026
CVE-2026-133250CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/middie
NoYesNov 21, 2026
CVE-2026-133120CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/express
NoYesNov 21, 2026
CVE-2026-133312MEDIUM5.3
  • JavaScript logoJavaScript
  • @fastify/rate-limit
NoYesNov 21, 2026
CVE-2026-133273LOW3.7
  • JavaScript logoJavaScript
  • @fastify/swagger-ui
NoYesNov 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management