Mittel

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

  • Veröffentlicht: 16.07.2025
  • Aktualisiert: 11.10.2026 10:22

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

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket @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
npm-Paket @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
npm-Paket @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
npm-Paket petite-vue-i18n >= 10.0.0, < 10.0.8, >= 11.0.0, < 11.1.10 10.0.8, 11.1.10
npm-Paket 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

Verweise

CVSS-Wert -
CVSS-Vektor
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
Schwäche (CWE)
CWE-79
Plattform
npm
Paket
@intlify/core, @intlify/core-base, @intlify/vue-i18n-core
Veröffentlicht
16.07.2025
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-x8qp-wqqm-57ph - CC BY 4.0

Schwachstellenhistorie: petite-vue-i18n

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
4
Erste → letzte
12.2024 07.2025
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 1
  • Mittel 3

Veröffentlichungen pro Jahr

  1. 2024: 2
  2. 2025: 2
  3. 2026: 0
  1. vue-i18n's escapeParameterHtml does not prevent DOM-based XSS through its tag attributes dieser Eintrag
    Mittel CVE-2025-53892 >= 10.0.0, < 10.0.8, >= 11.0.0, < 11.1.10 10.0.8, 11.1.10
  2. Hoch CVE-2025-27597 >= 10.0.0, < 10.0.6, >= 11.0.0-beta.0, < 11.1.2 10.0.6, 11.1.2
  3. Mittel CVE-2024-52810 >= 10.0.0, < 10.0.5 10.0.5
  4. Mittel CVE-2024-52809 >= 10.0.0, < 10.0.5 10.0.5

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.