GHSA-9qc3-h48f-7h96

Suggest an improvement
Source
https://github.com/advisories/GHSA-9qc3-h48f-7h96
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-9qc3-h48f-7h96
Aliases
Published
2026-12-04T22:14:08Z
Modified
2026-12-05T18:45:11Z
Severity
  • 7.2 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N CVSS Calculator
Summary
Vue I18n: sanitizeTranslatedHtml bypass via unterminated attribute values
Details

Summary

When escapeParameter is enabled (escapeParameterHtml in the Legacy API), Vue I18n passes the translated string through sanitizeTranslatedHtml(). The sanitizer disables javascript: URLs by rewriting them to about:blank — but only for attributes it can recognize. Both recognition passes require a well-formed attribute: the quoted pass needs the closing quote inside the message, and the unquoted pass rejects any value that starts with a quote character. A message that opens an attribute value and never closes it therefore keeps its javascript: URL verbatim.

The HTML tokenizer, however, does not stop at the end of the message. In server-side rendering the unterminated attribute value continues into the rest of the page and closes at the next " in the application's own markup; the element is then emitted with the attacker's javascript: URL as its src/href. A // inside the URL comments out the swallowed page content, so the executed script is exactly attacker-controlled. An <iframe src="javascript:..."> runs without any user interaction, in the origin of the application.

Affected component

  • sanitizeTranslatedHtml() in packages/shared/src/sanitize.ts
    • quoted-attribute pass: packages/shared/src/sanitize.ts L139-148 (/([\w:-]+)\s*=\s*"([^"]*)"/g requires a closing quote)
    • unquoted-attribute pass: packages/shared/src/sanitize.ts L186-189 (value class [^\s"'=<>]+cannot match a value starting with"`)
  • Sanitization is applied to every translation result when escapeParameter is on: packages/core-base/src/translate.ts L715-717.
  • Verified against the released sanitizer at v11.4.18 (the version that fixed GHSA-jrxq-gc2q-9357) and master v12.0.0-alpha.9 (c528b8d) — the relevant regexes are identical in both.
  • Affected packages: vue-i18n, petite-vue-i18n, @intlify/core-base, @intlify/core, @intlify/vue-i18n-core, @intlify/shared (same versions as GHSA-jrxq-gc2q-9357).
  • Not affected: client-side-only rendering (innerHTML of a lone message string drops the unterminated tag token at EOF — verified with parse5), and <i18n-t> (does not render translations as HTML).

PoC

Message (attacker-controlled translation, escapeParameter: true):

<iframe src="javascript:alert(document.domain)//

No closing quote. sanitizeTranslatedHtml() returns the string byte-identical (verified with an exact replica of the released code for v11.4.18 and v12.0.0-alpha.9):

import { createSSRApp, h } from 'vue'
import { renderToString } from 'vue/server-renderer'
import { createI18n } from 'vue-i18n'

const i18n = createI18n({
  legacy: false,
  locale: 'en',
  escapeParameter: true,
  messages: { en: { hello: '<iframe src="javascript:alert(document.domain)//' } }
})

const app = createSSRApp({
  render: () => h('div', { innerHTML: i18n.global.t('hello') })
})
app.use(i18n)

console.log(await renderToString(app))
// the iframe start tag is still unterminated; the server continues writing the page

On the server, the rest of the page (footer, class="...", scripts) follows. In a browser, the tokenizer keeps src open across the page boundary and closes it at the next "; the element is emitted with src="javascript:alert(document.domain)//</div><footer class=" and the // comments out the swallowed content — alert(document.domain) runs in the application origin when the iframe loads, with no user interaction. Verified with parse5 (spec-compliant HTML parser):

PAGE PARSE: div -> {id="app"}
  iframe -> {src="javascript:alert(document.domain)//</div><foo", footer"=""}

The click-required variant is <a href="javascript:alert(document.domain)// (same mechanism, anchor emitted with the javascript: URL).

Note: the srcdoc and event-handler neutralizations are string-wide and DO apply to unterminated values (an unterminated <iframe srcdoc="<img src=x onerror=alert(1)// gets its inner onerror neutralized to &#111;nerror, and character references are not decoded in attribute names per WHATWG §13.2.5.32), so the javascript:-URL attribute is the surviving vector.

Impact

Applications that enable escapeParameter, render translations as HTML on the server (v-html/innerHTML in SSR, Nuxt, pre-rendered pages), and contain message content that is not fully trusted (crowdsourced or stored translations) are affected. An attacker who can change such a message runs script in the origin of the application for every visitor of a page that shows the message (stored XSS), without any user interaction, despite the sanitizer — the exact impact model of GHSA-jrxq-gc2q-9357.

Suggested CVSS 3.1

7.2 — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N (same vector as GHSA-jrxq-gc2q-9357)

Suggested fix

Detect unterminated attribute values at the end of sanitization and neutralize them, e.g. escape the < of any start tag whose quoted attribute value is still open at end of string (/<(?=[^<]*=[^"]*"(?:[^"]*)*$)/-class detection, or track quote parity while scanning), so the element degrades to text exactly like the <script>/<base>/<animate>/<set> neutralization. A robust alternative is to tokenize with a spec-compliant HTML tokenizer and re-serialize instead of regex passes. Add test cases for unclosed " and ' attribute values in packages/shared/test/sanitize.test.ts (58 existing cases, none cover unterminated values).

Dedup

  • Not any of the 9 published advisories. GHSA-jrxq-gc2q-9357 (SSR <script>), GHSA-473g-cvf6-mfxj (xlink:href/animate/set), GHSA-83rm-6c8r-g728 (srcdoc) are element/attribute-name specific; this is a value-shape (unterminated attribute) bypass with a distinct root cause.
  • The private-security fork merges b27a50e (Nov 1 → 11.4.17) and a66ace0 (Nov 3 → 11.4.18) did not modify the quoted- or unquoted-attribute URL passes; their diffs are fully accounted for by the two published advisories.
  • Distinct from GHSA-8rc2-428q-7ww3 (escaping gap in escapeParams), CVE-2025-53892 (pre-sanitizer era), and the prototype-pollution advisories.

Patches

Fixed in vue-i18n 11.4.19 and 12.0.0-alpha.10, and in the same versions of petite-vue-i18n, @intlify/core-base, @intlify/core, @intlify/vue-i18n-core and @intlify/shared.

sanitizeTranslatedHtml() now reads tags and attributes with the rules of the HTML tokenizer, so that it agrees with browsers on where each attribute starts and ends, and it checks every attribute of every start tag. A tag, a comment, or an element like <textarea> that is not closed at the end of a translation is turned into text, so that it cannot take in the rest of the page when the HTML is rendered on the server.

v9 and v10 are not supported, and do not get a fix.

Workarounds

Do not render translation messages from untrusted sources with v-html, even with escapeParameter enabled. Use Component interpolation instead.

Related

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-12-04T22:14:08Z",
    "nvd_published_at":  "2026-12-03T20:17:48Z",
    "severity":  "HIGH"
}
References

Affected packages

npm
vue-i18n

Package

Name
vue-i18n
View open source insights on deps.dev
Purl
pkg:npm/vue-i18n

Affected ranges

Affected versions

9.*
9.14.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
vue-i18n

Package

Name
vue-i18n
View open source insights on deps.dev
Purl
pkg:npm/vue-i18n

Affected ranges

Affected versions

10.*
10.0.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
vue-i18n

Package

Name
vue-i18n
View open source insights on deps.dev
Purl
pkg:npm/vue-i18n

Affected ranges

Type
SEMVER
Events
Introduced
11.1.10
Fixed
11.4.19

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
vue-i18n

Package

Name
vue-i18n
View open source insights on deps.dev
Purl
pkg:npm/vue-i18n

Affected ranges

Type
SEMVER
Events
Introduced
12.0.0-alpha.4
Fixed
12.0.0-alpha.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
petite-vue-i18n

Package

Name
petite-vue-i18n
View open source insights on deps.dev
Purl
pkg:npm/petite-vue-i18n

Affected ranges

Affected versions

9.*
9.14.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
petite-vue-i18n

Package

Name
petite-vue-i18n
View open source insights on deps.dev
Purl
pkg:npm/petite-vue-i18n

Affected ranges

Affected versions

10.*
10.0.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
petite-vue-i18n

Package

Name
petite-vue-i18n
View open source insights on deps.dev
Purl
pkg:npm/petite-vue-i18n

Affected ranges

Type
SEMVER
Events
Introduced
11.1.10
Fixed
11.4.19

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
petite-vue-i18n

Package

Name
petite-vue-i18n
View open source insights on deps.dev
Purl
pkg:npm/petite-vue-i18n

Affected ranges

Type
SEMVER
Events
Introduced
12.0.0-alpha.4
Fixed
12.0.0-alpha.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/core-base

Package

Name
@intlify/core-base
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core-base

Affected ranges

Affected versions

9.*
9.14.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/core-base

Package

Name
@intlify/core-base
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core-base

Affected ranges

Affected versions

10.*
10.0.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/core-base

Package

Name
@intlify/core-base
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core-base

Affected ranges

Type
SEMVER
Events
Introduced
11.1.10
Fixed
11.4.19

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/core-base

Package

Name
@intlify/core-base
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core-base

Affected ranges

Type
SEMVER
Events
Introduced
12.0.0-alpha.4
Fixed
12.0.0-alpha.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/core

Package

Name
@intlify/core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core

Affected ranges

Affected versions

9.*
9.14.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/core

Package

Name
@intlify/core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core

Affected ranges

Affected versions

10.*
10.0.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/core

Package

Name
@intlify/core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core

Affected ranges

Type
SEMVER
Events
Introduced
11.1.10
Fixed
11.4.19

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/core

Package

Name
@intlify/core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core

Affected ranges

Type
SEMVER
Events
Introduced
12.0.0-alpha.4
Fixed
12.0.0-alpha.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/vue-i18n-core

Package

Name
@intlify/vue-i18n-core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/vue-i18n-core

Affected ranges

Affected versions

9.*
9.14.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/vue-i18n-core

Package

Name
@intlify/vue-i18n-core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/vue-i18n-core

Affected ranges

Affected versions

10.*
10.0.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/vue-i18n-core

Package

Name
@intlify/vue-i18n-core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/vue-i18n-core

Affected ranges

Type
SEMVER
Events
Introduced
11.1.10
Fixed
11.4.19

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/vue-i18n-core

Package

Name
@intlify/vue-i18n-core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/vue-i18n-core

Affected ranges

Type
SEMVER
Events
Introduced
12.0.0-alpha.4
Fixed
12.0.0-alpha.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/shared

Package

Name
@intlify/shared
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/shared

Affected ranges

Affected versions

9.*
9.14.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/shared

Package

Name
@intlify/shared
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/shared

Affected ranges

Affected versions

10.*
10.0.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/shared

Package

Name
@intlify/shared
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/shared

Affected ranges

Type
SEMVER
Events
Introduced
11.1.10
Fixed
11.4.19

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"
@intlify/shared

Package

Name
@intlify/shared
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/shared

Affected ranges

Type
SEMVER
Events
Introduced
12.0.0-alpha.4
Fixed
12.0.0-alpha.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9qc3-h48f-7h96/GHSA-9qc3-h48f-7h96.json"