Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-x8qp-wqqm-57ph

Опубликовано: 16 июл. 2025
Источник: github
Github: Прошло ревью
CVSS4: 5.3

Описание

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

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) .

Пакеты

Наименование

vue-i18n

npm
Затронутые версииВерсия исправления

>= 9.0.0, < 9.14.5

9.14.5

Наименование

vue-i18n

npm
Затронутые версииВерсия исправления

>= 10.0.0, < 10.0.8

10.0.8

Наименование

vue-i18n

npm
Затронутые версииВерсия исправления

>= 11.0.0, < 11.1.10

11.1.10

Наименование

@intlify/core

npm
Затронутые версииВерсия исправления

>= 9.0.0, < 9.14.5

9.14.5

Наименование

@intlify/core

npm
Затронутые версииВерсия исправления

>= 10.0.0, < 10.0.8

10.0.8

Наименование

@intlify/core

npm
Затронутые версииВерсия исправления

>= 11.0.0, < 11.1.10

11.1.10

Наименование

@intlify/core-base

npm
Затронутые версииВерсия исправления

>= 9.0.0, < 9.14.5

9.14.5

Наименование

@intlify/core-base

npm
Затронутые версииВерсия исправления

>= 10.0.0, < 10.0.8

10.0.8

Наименование

@intlify/core-base

npm
Затронутые версииВерсия исправления

>= 11.0.0, < 11.1.10

11.1.10

Наименование

@intlify/vue-i18n-core

npm
Затронутые версииВерсия исправления

>= 9.2.0, < 9.14.5

9.14.5

Наименование

@intlify/vue-i18n-core

npm
Затронутые версииВерсия исправления

>= 10.0.0, < 10.0.8

10.0.8

Наименование

@intlify/vue-i18n-core

npm
Затронутые версииВерсия исправления

>= 11.0.0, < 11.1.10

11.1.10

Наименование

petite-vue-i18n

npm
Затронутые версииВерсия исправления

>= 10.0.0, < 10.0.8

10.0.8

Наименование

petite-vue-i18n

npm
Затронутые версииВерсия исправления

>= 11.0.0, < 11.1.10

11.1.10

EPSS

Процентиль: 28%
0.001
Низкий

5.3 Medium

CVSS4

Дефекты

CWE-79

Связанные уязвимости

nvd
7 месяцев назад

Vue I18n is the internationalization plugin for Vue.js. The escapeParameterHtml: true option in Vue I18n is designed to protect against HTML/script injection by escaping interpolated parameters. However, starting in version 9.0.0 and prior to versions 9.14.5, 10.0.8, and 11.1.0, 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. Versions 9.14.5, 10.0.8, and 11.1.0 contain a fix for the issue.

EPSS

Процентиль: 28%
0.001
Низкий

5.3 Medium

CVSS4

Дефекты

CWE-79