Skip to main content

CVE-2026-118257 — Vulnerability in vue-i18n — CVE Details

HIGH

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

Published October 28, 2026Updated October 28, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.37%). Schedule for your next planned update.

Does your project use an affected vue-i18n version?

Paste your package-lock.json to check it for CVE-2026-118257 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

Summary

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.

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.

Patches

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.

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

Advisory Timeline

  • First published October 28, 2026 (29 days ago).
  • Last revised October 28, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update vue-i18n to 11.4.14 or later
npm install vue-i18n@11.4.14
npm
Update vue-i18n to 12.0.0-alpha.5 or later
npm install vue-i18n@12.0.0-alpha.5
npm
Update @intlify/vue-i18n-core to 12.0.0-alpha.5 or later
npm install @intlify/vue-i18n-core@12.0.0-alpha.5
npm
Update @intlify/vue-i18n-core to 11.4.14 or later
npm install @intlify/vue-i18n-core@11.4.14
npm
Update petite-vue-i18n to 12.0.0-alpha.5 or later
npm install petite-vue-i18n@12.0.0-alpha.5
npm
Update petite-vue-i18n to 11.4.14 or later
npm install petite-vue-i18n@11.4.14
npm
Update @intlify/core to 11.4.14 or later
npm install @intlify/core@11.4.14
npm
Update @intlify/shared to 11.4.14 or later
npm install @intlify/shared@11.4.14
npm
Update @intlify/core to 12.0.0-alpha.5 or later
npm install @intlify/core@12.0.0-alpha.5
npm
Update @intlify/core-base to 12.0.0-alpha.5 or later
npm install @intlify/core-base@12.0.0-alpha.5
npm
Update @intlify/shared to 12.0.0-alpha.5 or later
npm install @intlify/shared@12.0.0-alpha.5
npm
Update @intlify/core-base to 11.4.14 or later
npm install @intlify/core-base@11.4.14

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (24)

Affects 1 ecosystem: npm (6).

PackageFixed In
vue-i18n npm · Affected: All versions11.4.14
vue-i18n npm · Affected: 9.14.5No fix available
vue-i18n npm · Affected: 12.0.0-alpha.412.0.0-alpha.5
@intlify/vue-i18n-core npm · Affected: 12.0.0-alpha.412.0.0-alpha.5
@intlify/vue-i18n-core npm · Affected: All versions11.4.14
@intlify/vue-i18n-core npm · Affected: 10.0.8No fix available
vue-i18n npm · Affected: 10.0.8No fix available
@intlify/vue-i18n-core npm · Affected: 9.14.5No fix available
petite-vue-i18n npm · Affected: 10.0.8No fix available
petite-vue-i18n npm · Affected: 12.0.0-alpha.412.0.0-alpha.5
petite-vue-i18n npm · Affected: 9.14.5No fix available
petite-vue-i18n npm · Affected: All versions11.4.14
@intlify/core npm · Affected: All versions11.4.14
@intlify/core npm · Affected: 9.14.5No fix available
@intlify/shared npm · Affected: All versions11.4.14
@intlify/core-base npm · Affected: 10.0.8No fix available
@intlify/core npm · Affected: 12.0.0-alpha.412.0.0-alpha.5
@intlify/shared npm · Affected: 9.14.5No fix available
@intlify/core-base npm · Affected: 9.14.5No fix available
@intlify/core-base npm · Affected: 12.0.0-alpha.412.0.0-alpha.5
@intlify/shared npm · Affected: 12.0.0-alpha.412.0.0-alpha.5
@intlify/core npm · Affected: 10.0.8No fix available
@intlify/shared npm · Affected: 10.0.8No fix available
@intlify/core-base npm · Affected: All versions11.4.14

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-116
    Improper Encoding or EscapingMITRE
  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.2 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

Frequently Asked Questions

What is CVE-2026-118257?
Vue I18n: escapeParameter does not prevent XSS through srcdoc in translation messages. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.2/10).
How do I check if my project is affected by CVE-2026-118257?
CVE-2026-118257 affects vue-i18n, @intlify/vue-i18n-core and petite-vue-i18n (and 3 more). It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-118257 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.2

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.37%
EPSS percentile: 23.2

This is a below-median EPSS score — only 23.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-83rm-6c8r-g728

Related CVEs

  • CVE-2026-83816
    HIGH

    CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE

  • CVE-2026-83817
    HIGH

    CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

  • CVE-2025-27597
    HIGH

    Vue I18n Allows Prototype Pollution in `handleFlatJson`

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json