
Cloud Vulnerability DB
A community-led vulnerabilities database
When escapeParameter is enabled (escapeParameterHtml in the Legacy API), Vue I18n passes the translated string through sanitizeTranslatedHtml(). The sanitizer replaces javascript: URLs in href, src, action and formaction with about:blank, but an SVG link can get a javascript: URL in two ways that the sanitizer does not check:
xlink:href attribute, the older spelling of href that an SVG <a> still follows, and<animate> and <set>, which can set href of an SVG <a> through values or to.
When a user clicks such a link, the script runs in the origin of the application. This bypasses the javascript: URL check that the sanitizer has had since the fix for CVE-2025-53892 (GHSA-x8qp-wqqm-57ph).sanitizeTranslatedHtml() (packages/shared/src/sanitize.ts in v11.4.16) checks for javascript: URLs in two places:
href, src, action or formaction.<, > or /.xlink:href passes both checks: its name is not in the list, and in the unquoted form, href comes after :. Escaping the value does not help, since the browser decodes character references in attribute values before it uses them as URLs.
<animate attributeName="href" values="javascript:..."> and <set attributeName="href" to="javascript:..."> set href of the parent <a> after the HTML is rendered. values and to are not URL attributes, so the sanitizer does not look at them. The maintainers found this variant while fixing the xlink:href report.
This can be reached in two ways:
javascript: URLs in the final HTML.xlink:href. With a message such as <svg><a xlink:href="{url}">...</a></svg>, escapeParameter escapes url, but escaping does not change a javascript: scheme.import { createI18n } from 'vue-i18n'
const i18n = createI18n({
legacy: false,
locale: 'en',
escapeParameter: true,
messages: {
en: {
xlink: '<svg><a xlink:href="javascript:alert(1)"><text y="20">click</text></a></svg>',
animation:
'<svg><a><set attributeName="href" to="javascript:alert(1)"/><text y="20">click</text></a></svg>'
}
}
})
console.log(i18n.global.t('xlink'))
console.log(i18n.global.t('animation'))
// v11.4.16: both are returned unchangedRendered with v-html, a click on either link runs alert(1) in the origin of the page. We checked this in Chromium 143, Chrome 156 and WebKit 26, and one of the reporters also confirmed the xlink:href case in Firefox.
Applications are affected when they enable escapeParameter, render translations as HTML (for example with v-html), and one of the following applies:
xlink:href.
An attacker can then run script in the origin of the application when the user clicks the link (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.17 and 12.0.0-alpha.8. The sanitizer now checks javascript: URLs in xlink:href in the same way as in href, and turns the start tags of <animate> and <set> into text. It does the same for <base>, which changes how the page resolves relative URLs. SVG animations with <animate> or <set> in translations no longer run while escapeParameter is enabled.
v9 and v10 are no longer supported and will not be fixed. Please migrate to v11.
v-html. Use component interpolation (<i18n-t>) instead.xlink:href.sanitizeTranslatedHtml()srcdocSource: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."