An open API service providing security vulnerability metadata for many open source software ecosystems.

GSA_kwCzR0hTQS14OHFwLXdxcW0tNTdwaM4ABKPO

Moderate CVSS: 5.3 EPSS: 0.00134% (0.33983 Percentile) EPSS:

vue-i18n's escapeParameterHtml does not prevent DOM-based XSS through its tag attributes

Affected Packages Affected Versions Fixed Versions
npm:petite-vue-i18n >= 11.0.0, < 11.1.10, >= 10.0.0, < 10.0.8 11.1.10, 10.0.8
3 Dependent packages
9 Dependent repositories
20,302 Downloads last month

Affected Version Ranges

All affected versions

10.0.0, 10.0.1, 10.0.2, 10.0.3, 10.0.4, 10.0.5, 10.0.6, 10.0.7, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.1.2, 11.1.3, 11.1.4, 11.1.5, 11.1.6, 11.1.7, 11.1.8, 11.1.9

All unaffected versions

9.2.0, 9.2.1, 9.2.2, 9.3.0, 9.4.0, 9.4.1, 9.5.0, 9.6.0, 9.6.1, 9.6.2, 9.6.3, 9.6.4, 9.6.5, 9.7.0, 9.7.1, 9.8.0, 9.9.0, 9.9.1, 9.10.0, 9.10.1, 9.10.2, 9.11.0, 9.11.1, 9.12.0, 9.12.1, 9.13.0, 9.13.1, 9.14.0, 9.14.1, 9.14.2, 9.14.3, 9.14.4, 9.14.5, 10.0.8, 11.1.10, 11.1.11

npm:@intlify/vue-i18n-core >= 11.0.0, < 11.1.10, >= 10.0.0, < 10.0.8, >= 9.2.0, < 9.14.5 11.1.10, 10.0.8, 9.14.5
3 Dependent packages
0 Dependent repositories
13,839 Downloads last month

Affected Version Ranges

All affected versions

9.2.0, 9.2.1, 9.2.2, 9.3.0, 9.4.0, 9.4.1, 9.5.0, 9.6.0, 9.6.1, 9.6.2, 9.6.3, 9.6.4, 9.6.5, 9.7.0, 9.7.1, 9.8.0, 9.9.0, 9.9.1, 9.10.0, 9.10.1, 9.10.2, 9.11.0, 9.11.1, 9.12.0, 9.12.1, 9.13.0, 9.13.1, 9.14.0, 9.14.1, 9.14.2, 9.14.3, 9.14.4, 10.0.0, 10.0.1, 10.0.2, 10.0.3, 10.0.4, 10.0.5, 10.0.6, 10.0.7, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.1.2, 11.1.3, 11.1.4, 11.1.5, 11.1.6, 11.1.7, 11.1.8, 11.1.9

All unaffected versions

9.14.5, 10.0.8, 11.1.10, 11.1.11

npm:@intlify/core-base >= 11.0.0, < 11.1.10, >= 10.0.0, < 10.0.8, >= 9.0.0, < 9.14.5 11.1.10, 10.0.8, 9.14.5
26 Dependent packages
6,081 Dependent repositories
5,823,303 Downloads last month

Affected Version Ranges

All affected versions

9.0.0, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6, 9.1.7, 9.1.8, 9.1.9, 9.1.10, 9.1.11, 9.2.0, 9.2.1, 9.2.2, 9.3.0, 9.4.0, 9.4.1, 9.5.0, 9.6.0, 9.6.1, 9.6.2, 9.6.3, 9.6.4, 9.6.5, 9.7.0, 9.7.1, 9.8.0, 9.9.0, 9.9.1, 9.10.0, 9.10.1, 9.10.2, 9.11.0, 9.11.1, 9.12.0, 9.12.1, 9.13.0, 9.13.1, 9.14.0, 9.14.1, 9.14.2, 9.14.3, 9.14.4, 10.0.0, 10.0.1, 10.0.2, 10.0.3, 10.0.4, 10.0.5, 10.0.6, 10.0.7, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.1.2, 11.1.3, 11.1.4, 11.1.5, 11.1.6, 11.1.7, 11.1.8, 11.1.9

All unaffected versions

9.14.5, 10.0.8, 11.1.10, 11.1.11

npm:@intlify/core >= 11.0.0, < 11.1.10, >= 10.0.0, < 10.0.8, >= 9.0.0, < 9.14.5 11.1.10, 10.0.8, 9.14.5
6 Dependent packages
772 Dependent repositories
1,067,070 Downloads last month

Affected Version Ranges

All affected versions

9.0.0, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6, 9.1.7, 9.1.8, 9.1.9, 9.1.10, 9.1.11, 9.2.0, 9.2.1, 9.2.2, 9.3.0, 9.4.0, 9.4.1, 9.5.0, 9.6.0, 9.6.1, 9.6.2, 9.6.3, 9.6.4, 9.6.5, 9.7.0, 9.7.1, 9.8.0, 9.9.0, 9.9.1, 9.10.0, 9.10.1, 9.10.2, 9.11.0, 9.11.1, 9.12.0, 9.12.1, 9.13.0, 9.13.1, 9.14.0, 9.14.1, 9.14.2, 9.14.3, 9.14.4, 10.0.0, 10.0.1, 10.0.2, 10.0.3, 10.0.4, 10.0.5, 10.0.6, 10.0.7, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.1.2, 11.1.3, 11.1.4, 11.1.5, 11.1.6, 11.1.7, 11.1.8, 11.1.9

All unaffected versions

9.14.5, 10.0.8, 11.1.10, 11.1.11

npm:vue-i18n >= 11.0.0, < 11.1.10, >= 10.0.0, < 10.0.8, >= 9.0.0, < 9.14.5 11.1.10, 10.0.8, 9.14.5
4,626 Dependent packages
42,353 Dependent repositories
6,975,901 Downloads last month

Affected Version Ranges

All affected versions

9.0.0, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6, 9.1.7, 9.1.8, 9.1.9, 9.1.10, 9.1.11, 9.2.0, 9.2.1, 9.2.2, 9.3.0, 9.4.0, 9.4.1, 9.5.0, 9.6.0, 9.6.1, 9.6.2, 9.6.3, 9.6.4, 9.6.5, 9.7.0, 9.7.1, 9.8.0, 9.9.0, 9.9.1, 9.10.0, 9.10.1, 9.10.2, 9.11.0, 9.11.1, 9.12.0, 9.12.1, 9.13.0, 9.13.1, 9.14.0, 9.14.1, 9.14.2, 9.14.3, 9.14.4, 10.0.0, 10.0.1, 10.0.2, 10.0.3, 10.0.4, 10.0.5, 10.0.6, 10.0.7, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.1.2, 11.1.3, 11.1.4, 11.1.5, 11.1.6, 11.1.7, 11.1.8, 11.1.9

All unaffected versions

0.0.0, 0.1.0, 0.1.1, 0.1.2, 0.2.0, 0.11.0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10.0.8, 11.1.10, 11.1.11

Summary

The escapeParameterHtml: true option in Vue I18n is designed to protect against HTML/script injection by escaping interpolated parameters. However, this setting fails to prevent execution of certain tag-based payloads, such as <img src=x onerror=...>, if the interpolated value is inserted inside an HTML context using v-html.

This may lead to a DOM-based XSS vulnerability, even when using escapeParameterHtml: true, if a translation string includes minor HTML and is rendered via v-html.

Details

When escapeParameterHtml: true is enabled, it correctly escapes common injection points.

However, it does not sanitize entire attribute contexts, which can be used as XSS vectors via:

<img src=x onerror=alert(1)>

PoC

In your Vue I18n configuration:

const i18n = createI18n({
  escapeParameterHtml: true,
  messages: {
    en: {
      vulnerable: 'Caution: <img src=x onerror="{payload}">'
    }
  }
});

Use this interpolated payload:

const payload = '<script>alert("xss")</script>';
Render the translation using v-html (even not using v-html):

<p v-html="$t('vulnerable', { payload })"></p>
Expected: escaped content should render as text, not execute.

Actual: script executes in some environments (or the payload is partially parsed as HTML).

Impact

This creates a DOM-based Cross-Site Scripting (XSS) vulnerability despite enabling a security option (escapeParameterHtml) .

References: