Improper Encoding or Escaping of Output Affecting vue-i18n package, versions >=12.0.0-alpha.4 <12.0.0-alpha.5>=11.1.10 <11.4.14


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.27% (20th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-VUEI18N-22132242
  • published2 Nov 2026
  • disclosed28 Oct 2026
  • creditAlicia Sykes, NotAFlightRisk

Introduced: 28 Oct 2026

NewCVE-2026-118257  (opens in a new tab)
CWE-116  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade vue-i18n to version 12.0.0-alpha.5, 11.4.14 or higher.

Overview

vue-i18n is an Internationalization plugin for Vue.js

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the sanitizeTranslatedHtml function in packages/shared/src/sanitize.ts, which fails to neutralize srcdoc attributes in translation messages. An attacker who controls translation message content can inject a srcdoc attribute on an <iframe> element; the browser entity-decodes the attribute value and parses it as a full HTML document in the same origin as the page, allowing arbitrary script execution. The existing sanitizer neutralized on* event handlers but did not account for the secondary HTML parsing context that srcdoc introduces, leaving that vector unblocked.

PoC

import { createI18n } from 'vue-i18n'

const i18n = createI18n({
  legacy: false,
  locale: 'en',
  escapeParameter: true,
  messages: {
    en: { message: '<iframe srcdoc="<b>x</b>"></iframe>' }
  }
})

console.log(i18n.global.t('message'))
// v11.4.13: <iframe srcdoc="&lt;b&gt;x&lt;/b&gt;"></iframe>

The browser decodes the value and renders <b>x</b> as a separate document inside the <iframe>, in the same origin as the page. Any markup in that position is parsed the same way.

Note: The PoC uses vue-i18n with legacy: false and escapeParameter: true, demonstrating that the srcdoc attribute value survives sanitization and is decoded by the browser.

CVSS Base Scores

version 4.0
version 3.1