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) .
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Paczka npm | @intlify/core | >= 9.0.0, < 9.14.5, >= 10.0.0, < 10.0.8, >= 11.0.0, < 11.1.10 | 9.14.5, 10.0.8, 11.1.10 |
| Paczka npm | @intlify/core-base | >= 9.0.0, < 9.14.5, >= 10.0.0, < 10.0.8, >= 11.0.0, < 11.1.10 | 9.14.5, 10.0.8, 11.1.10 |
| Paczka npm | @intlify/vue-i18n-core | >= 9.2.0, < 9.14.5, >= 10.0.0, < 10.0.8, >= 11.0.0, < 11.1.10 | 9.14.5, 10.0.8, 11.1.10 |
| Paczka npm | petite-vue-i18n | >= 10.0.0, < 10.0.8, >= 11.0.0, < 11.1.10 | 10.0.8, 11.1.10 |
| Paczka npm | vue-i18n | >= 9.0.0, < 9.14.5, >= 10.0.0, < 10.0.8, >= 11.0.0, < 11.1.10 | 9.14.5, 10.0.8, 11.1.10 |
Odnośniki
- https://github.com/intlify/vue-i18n/security/advisories/GHSA-x8qp-wqqm-57ph
- https://nvd.nist.gov/vuln/detail/CVE-2025-53892
- https://github.com/intlify/vue-i18n/pull/2229
- https://github.com/intlify/vue-i18n/pull/2230
- https://github.com/intlify/vue-i18n/commit/49f982443ab8fd94ecc427b265ce97d57df94d7e
- https://github.com/intlify/vue-i18n/commit/a47099619fb9b256e86341a8658ebe72e92ab099
- https://github.com/intlify/vue-i18n
- https://github.com/intlify/vue-i18n/releases/tag/v10.0.8
- https://github.com/intlify/vue-i18n/releases/tag/v11.1.10
- https://github.com/intlify/vue-i18n/releases/tag/v9.14.5
- Wektor CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N- Słabość (CWE)
CWE-79- Platforma
- npm
- Paczka
@intlify/core, @intlify/core-base, @intlify/vue-i18n-core- Ujawniono
- 16.07.2025
- Aktualizacja
- 11.10.2026 10:22
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-x8qp-wqqm-57ph - CC BY 4.0
Historia podatności: petite-vue-i18n
Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 4
- Pierwsza → ostatnia
- 12.2024 07.2025
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Wysoka 1
- Średnia 3
Ujawnienia w latach
- 2024: 2
- 2025: 2
- 2026: 0
-
vue-i18n's escapeParameterHtml does not prevent DOM-based XSS through its tag attributes ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.