CVE-2026-118257

CVE-2026-118257 is a high-severity cross-site scripting (XSS) vulnerability in vue-i18n (npm), affecting versions = 9.14.5. It is fixed in 11.4.14, 12.0.0-alpha.5.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Vue I18n: escapeParameter does not prevent XSS through srcdoc in translation messages

When escapeParameter is enabled (escapeParameterHtml in the Legacy API), Vue I18n passes the translated string through sanitizeTranslatedHtml(). The sanitizer escapes < and > in attribute values and neutralizes event handler attributes such as onerror, but it does not handle the srcdoc attribute of <iframe>.

The value of srcdoc is an HTML document: the browser decodes the character references in it and parses the result as a nested document in the same origin. The escaping and the neutralization done by the sanitizer are both character references, so they are undone inside srcdoc. This bypasses the fix for CVE-2025-53892 (GHSA-x8qp-wqqm-57ph).

Details

sanitizeTranslatedHtml() (packages/shared/src/sanitize.ts in v11.4.13) works on the final translated string:

  1. It escapes <, >, " and ' inside quoted attribute values.
  2. It rewrites the on of event handler attributes to &#111;n.
  3. It replaces javascript: URLs in href, src, action and formaction with about:blank.

Inside srcdoc, steps 1 and 2 only produce character references, which the browser decodes before parsing the value as a document. Markup inside srcdoc therefore survives the sanitizer, with escaping or without it.

This can be reached in three ways:

  • A parameter inside srcdoc. With a message such as <iframe srcdoc="{content}"></iframe>, escapeParameter escapes content into character references, and the browser decodes them again.
  • Markup in a message. A message that contains an <iframe srcdoc="..."> keeps it after sanitizing. The documentation asks not to use HTML messages with content from users, but it also says that the sanitizer neutralizes event handlers in the final HTML.
  • Together with GHSA-8rc2-428q-7ww3. When a call passes a list and named values, the named values are not escaped. An <iframe srcdoc="..."> in a named value then reaches the sanitizer as markup, even with an ordinary message such as {0} {name}.

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.

Workarounds

  • Do not render translations that can contain untrusted content with v-html. Use component interpolation (<i18n-t>) instead.
  • Do not put srcdoc in translation messages, and do not pass values into it.

References

Impact

Applications are affected when they enable escapeParameter, render translations as HTML (for example with v-html), and one of the following applies:

  • an untrusted value is passed as a parameter that the message places inside srcdoc,
  • message content is not fully trusted (for example crowdsourced or stored translations), or
  • untrusted named values are passed in the same call as a list (GHSA-8rc2-428q-7ww3).

An attacker can then run script in the origin of the application (DOM-based XSS), despite the sanitizer.

Rendering through <i18n-t> is not affected, since it does not render translations as HTML.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

CVE-2026-118257 has a CVSS score of 7.2 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (11.4.14, 12.0.0-alpha.5); upgrading removes the vulnerable code path.

Affected versions

vue-i18n (= 9.14.5) vue-i18n (= 10.0.8) vue-i18n (>= 11.1.10, < 11.4.14) vue-i18n (= 12.0.0-alpha.4) petite-vue-i18n (= 9.14.5) petite-vue-i18n (= 10.0.8) petite-vue-i18n (>= 11.1.10, < 11.4.14) petite-vue-i18n (= 12.0.0-alpha.4) @intlify/core-base (= 9.14.5) @intlify/core-base (= 10.0.8) @intlify/core-base (>= 11.1.10, < 11.4.14) @intlify/core-base (= 12.0.0-alpha.4) @intlify/core (= 9.14.5) @intlify/core (= 10.0.8) @intlify/core (>= 11.1.10, < 11.4.14) @intlify/core (= 12.0.0-alpha.4) @intlify/vue-i18n-core (= 9.14.5) @intlify/vue-i18n-core (= 10.0.8) @intlify/vue-i18n-core (>= 11.1.10, < 11.4.14) @intlify/vue-i18n-core (= 12.0.0-alpha.4) @intlify/shared (= 9.14.5) @intlify/shared (= 10.0.8) @intlify/shared (>= 11.1.10, < 11.4.14) @intlify/shared (= 12.0.0-alpha.4)

Security releases

vue-i18n → 11.4.14 (npm) vue-i18n → 12.0.0-alpha.5 (npm) petite-vue-i18n → 11.4.14 (npm) petite-vue-i18n → 12.0.0-alpha.5 (npm) @intlify/core-base → 11.4.14 (npm) @intlify/core-base → 12.0.0-alpha.5 (npm) @intlify/core → 11.4.14 (npm) @intlify/core → 12.0.0-alpha.5 (npm) @intlify/vue-i18n-core → 11.4.14 (npm) @intlify/vue-i18n-core → 12.0.0-alpha.5 (npm) @intlify/shared → 11.4.14 (npm) @intlify/shared → 12.0.0-alpha.5 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Fixed in 11.4.14 and 12.0.0-alpha.5. The sanitizer now neutralizes the srcdoc attribute itself, in the same way as event handler attributes.

v9 and v10 are no longer supported and will not be fixed. Please migrate to v11.

Frequently Asked Questions

  1. What is CVE-2026-118257? CVE-2026-118257 is a high-severity cross-site scripting (XSS) vulnerability in vue-i18n (npm), affecting versions = 9.14.5. It is fixed in 11.4.14, 12.0.0-alpha.5. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2026-118257? CVE-2026-118257 has a CVSS score of 7.2 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-118257?
    • vue-i18n (npm) (versions = 9.14.5)
    • petite-vue-i18n (npm) (versions = 9.14.5)
    • @intlify/core-base (npm) (versions = 9.14.5)
    • @intlify/core (npm) (versions = 9.14.5)
    • @intlify/vue-i18n-core (npm) (versions = 9.14.5)
    • @intlify/shared (npm) (versions = 9.14.5)
  4. Is there a fix for CVE-2026-118257? Yes. CVE-2026-118257 is fixed in 11.4.14, 12.0.0-alpha.5. Upgrade to this version or later.
  5. Is CVE-2026-118257 exploitable, and should I be worried? Whether CVE-2026-118257 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-118257 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-118257?
    • Upgrade vue-i18n to 11.4.14 or later
    • Upgrade vue-i18n to 12.0.0-alpha.5 or later
    • Upgrade petite-vue-i18n to 11.4.14 or later
    • Upgrade petite-vue-i18n to 12.0.0-alpha.5 or later
    • Upgrade @intlify/core-base to 11.4.14 or later
    • Upgrade @intlify/core-base to 12.0.0-alpha.5 or later
    • Upgrade @intlify/core to 11.4.14 or later
    • Upgrade @intlify/core to 12.0.0-alpha.5 or later
    • Upgrade @intlify/vue-i18n-core to 11.4.14 or later
    • Upgrade @intlify/vue-i18n-core to 12.0.0-alpha.5 or later
    • Upgrade @intlify/shared to 11.4.14 or later
    • Upgrade @intlify/shared to 12.0.0-alpha.5 or later

Other vulnerabilities in vue-i18n

Stop the waste.
Protect your environment with Kodem.