vue-i18n escapeParameter sanitizer leaves elements open, so a translation can change how the rest of an SSR page is parsedGHSA-786j-gfwp-vhm5
MEDIUMFix: intlify/vue-i18n@813da5eGHSA-786j-gfwp-vhm5 is a medium-severity (CVSS 5.4) Cross-site Scripting (XSS) vulnerability. A fix is available — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-786j-gfwp-vhm5.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Description
Vue I18n is the internationalization plugin for Vue.js. In versions 9.14.5 and 10.0.8, and from 11.1.10 until 11.4.22 and 12.0.0-alpha.4 until 12.0.0-alpha.13, sanitizeTranslatedHtml() in packages/shared/src/sanitize.ts does not track the HTML element stack when escapeParameter is enabled. During SSR, an attacker-controlled translation can leave HTML, SVG, or MathML elements open, or close elements outside the translation, causing later page markup to be parsed in the attacker-selected context. Script execution requires a later inline script whose text contains attacker-controlled data and no intervening element that leaves SVG parsing; character-reference decoding can then let the data terminate a JavaScript string and execute in the application origin. Otherwise, the manipulated parser state can hide the page, capture later form controls, or absorb subsequent content. Client-only fragment rendering is not affected. This issue is fixed in versions 11.4.22 and 12.0.0-alpha.13.
Detection & mitigation playbook
VulnerabilityDetect
Identify every host running the affected component and compare the installed build against the fixed version below — for source-built or distro-packaged software the version string, not a lockfile, is the source of truth (`dpkg -l`, `rpm -q`, or the binary's own `--version`).
Fix
Upgrade the affected component to the fixed release for GHSA-786j-gfwp-vhm5, or apply your distribution's backported patch — distro builds are often patched at an older version number, so check your vendor's advisory rather than the upstream version alone.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This flaw has been rated as Moderate impact because exploitation requires Server-Side Rendering (SSR) applications to process untrusted translation strings under specific parameter escaping configurations. Client-side rendering applications deployed in Red Hat environments are not impacted by this issue. Furthermore,…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for GHSA-786j-gfwp-vhm5 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-786j-gfwp-vhm5 in your dependencies?
Find it across your dependency tree, including transitive dependencies.