Vue I18n XSS in iframe srcdoc translation sanitization
intlify vue-i18n
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| vue-i18n npm |
|
|
| petite-vue-i18n npm |
intlify vue-i18n
| Product | Affected | Fixed in |
|---|---|---|
| vue-i18n npm |
|
|
| petite-vue-i18n npm |
9.14.510.0.8≥ 11.1.10 · < 11.4.14≥ 12.0.0-alpha.4 · < 12.0.0-alpha.5
|
| @intlify/core-base npm |
|
|
| @intlify/core npm |
|
|
| @intlify/vue-i18n-core npm |
|
|
| @intlify/shared npm |
|
|
Vue I18n is the internationalization plugin for Vue.js. From 11.1.10 until 11.4.14 and from 12.0.0-alpha.4 until 12.0.0-alpha.5, sanitizeTranslatedHtml() escapes markup and event-handler text inside an iframe srcdoc value but leaves the srcdoc attribute active. Browsers decode the character references and parse the value as a same-origin nested HTML document, allowing attacker-controlled parameters or translation content placed in srcdoc to execute script when applications enable escapeParameter and render translations as HTML through v-html. Versions 9.14.5 and 10.0.8 are also affected and are no longer supported, while i18n-t rendering is not affected. This issue is fixed in versions 11.4.14 and 12.0.0-alpha.5.
From the CVE record · GitHub_M
Vue I18n leaves an iframe srcdoc attribute active when sanitizing translated HTML. Attacker-controlled parameters or translation content placed in srcdoc can execute script when an application enables escapeParameter and renders translations as HTML through v-html. i18n-t rendering is not affected.
Teams using npm packages vue-i18n, petite-vue-i18n, @intlify/core-base, @intlify/core, @intlify/vue-i18n-core, or @intlify/shared should check versions 9.14.5, 10.0.8, 11.1.10 through versions before 11.4.14, and 12.0.0-alpha.4.