GitHub Advisoryadvisory · npm
GHSA-x8qp-wqqm-57ph vue-i18n's escapeParameterHtml does not prevent DOM-based XSS through its tag attributes
MEDIUM
Official page ↗
- Aliases
- CVE-2025-53892
- Ecosystem
- npm
- Packages
- vue-i18n, @intlify/core, @intlify/core-base, @intlify/vue-i18n-core, petite-vue-i18n
- Severity
- Moderate
- CVSS vector
- 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
- Weaknesses
- CWE-79
- Reviewed
- 2025-07-16
Affected packages
• npm vue-i18n: >= 9.0.0, < 9.14.5 → fixed in 9.14.5
• npm vue-i18n: >= 10.0.0, < 10.0.8 → fixed in 10.0.8
• npm vue-i18n: >= 11.0.0, < 11.1.10 → fixed in 11.1.10
• npm @intlify/core: >= 9.0.0, < 9.14.5 → fixed in 9.14.5
• npm @intlify/core: >= 10.0.0, < 10.0.8 → fixed in 10.0.8
• npm @intlify/core: >= 11.0.0, < 11.1.10 → fixed in 11.1.10
• npm @intlify/core-base: >= 9.0.0, < 9.14.5 → fixed in 9.14.5
• npm @intlify/core-base: >= 10.0.0, < 10.0.8 → fixed in 10.0.8
• npm @intlify/core-base: >= 11.0.0, < 11.1.10 → fixed in 11.1.10
• npm @intlify/vue-i18n-core: >= 9.2.0, < 9.14.5 → fixed in 9.14.5
• npm @intlify/vue-i18n-core: >= 10.0.0, < 10.0.8 → fixed in 10.0.8
• npm @intlify/vue-i18n-core: >= 11.0.0, < 11.1.10 → fixed in 11.1.10
• npm petite-vue-i18n: >= 10.0.0, < 10.0.8 → fixed in 10.0.8
• npm petite-vue-i18n: >= 11.0.0, < 11.1.10 → fixed in 11.1.10
Description
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 ``, 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:
`
`
PoC
In your Vue I18n configuration:
```
const i18n = createI18n({
escapeParameterHtml: true,
messages: {
en: {
vulnerable: 'Caution: '
}
}
});
```
Use this interpolated payload:
`const payload = 'alert("xss")';`
Render the translation using v-html (even not using v-html):
`
`
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) .
Related
Alias · CVE (1)
- CVE-2025-53892 Vue I18n is the internationalization plugin for Vue.js. vulnerability
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
References
- https://github.com/intlify/vue-i18n/security/advisories/GHSA-x8qp-wqqm-57ph web
- https://nvd.nist.gov/vuln/detail/CVE-2025-53892 advisory
- https://github.com/intlify/vue-i18n/pull/2229 web
- https://github.com/intlify/vue-i18n/pull/2230 web
- https://github.com/intlify/vue-i18n/commit/49f982443ab8fd94ecc427b265ce97d57df94d7e web
- https://github.com/intlify/vue-i18n/commit/a47099619fb9b256e86341a8658ebe72e92ab099 web
- https://github.com/intlify/vue-i18n package
- https://github.com/intlify/vue-i18n/releases/tag/v10.0.8 web
- https://github.com/intlify/vue-i18n/releases/tag/v11.1.10 web
- https://github.com/intlify/vue-i18n/releases/tag/v9.14.5 web