{"id":"GHSA-x8qp-wqqm-57ph","revision":"0794b79ecdd3402b90feefe186446fd9","records":[{"revision":"0794b79ecdd3402b90feefe186446fd9","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-x8qp-wqqm-57ph","aliases":["CVE-2025-53892"],"title":"vue-i18n's escapeParameterHtml does not prevent DOM-based XSS through its tag attributes","description":"### Summary\nThe 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.\n\nThis 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.\n\n### Details\n\nWhen escapeParameterHtml: true is enabled, it correctly escapes common injection points.\n\nHowever, it does not sanitize entire attribute contexts, which can be used as XSS vectors via:\n\n`<img src=x onerror=alert(1)>\n`\n### PoC\nIn your Vue I18n configuration:\n\n```\nconst i18n = createI18n({\n  escapeParameterHtml: true,\n  messages: {\n    en: {\n      vulnerable: 'Caution: <img src=x onerror=\"{payload}\">'\n    }\n  }\n});\n```\nUse this interpolated payload:\n\n`const payload = '<script>alert(\"xss\")</script>';`\nRender the translation using v-html (even not using v-html):\n\n`<p v-html=\"$t('vulnerable', { payload })\"></p>\n`\nExpected: escaped content should render as text, not execute.\n\nActual: script executes in some environments (or the payload is partially parsed as HTML).\n\n### Impact\n\nThis creates a DOM-based Cross-Site Scripting (XSS) vulnerability despite enabling a security option (escapeParameterHtml) .","state":0,"publishedAt":"2025-07-16T19:32:48+00:00","modifiedAt":"2026-09-10T03:50:57.9725398+00:00","affected":[{"ecosystem":"npm","name":"vue-i18n","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"9.0.0"},{"kind":"fixed","version":"9.14.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"vue-i18n","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"10.0.0"},{"kind":"fixed","version":"10.0.8"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"vue-i18n","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"11.0.0"},{"kind":"fixed","version":"11.1.10"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/core","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"9.0.0"},{"kind":"fixed","version":"9.14.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/core","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"10.0.0"},{"kind":"fixed","version":"10.0.8"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/core","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"11.0.0"},{"kind":"fixed","version":"11.1.10"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/core-base","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"9.0.0"},{"kind":"fixed","version":"9.14.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/core-base","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"10.0.0"},{"kind":"fixed","version":"10.0.8"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/core-base","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"11.0.0"},{"kind":"fixed","version":"11.1.10"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/vue-i18n-core","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"9.2.0"},{"kind":"fixed","version":"9.14.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/vue-i18n-core","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"10.0.0"},{"kind":"fixed","version":"10.0.8"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@intlify/vue-i18n-core","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"11.0.0"},{"kind":"fixed","version":"11.1.10"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"petite-vue-i18n","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"10.0.0"},{"kind":"fixed","version":"10.0.8"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"petite-vue-i18n","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"11.0.0"},{"kind":"fixed","version":"11.1.10"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["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"],"sourceUrl":"https://github.com/advisories/GHSA-x8qp-wqqm-57ph","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-x8qp-wqqm-57ph","identifiers":["GHSA-x8qp-wqqm-57ph","CVE-2025-53892"]},"retained":false,"historicalAffected":[]}],"coverage":[]}