{"id":"CVE-2026-114133","aliases":["CVE-2026-114133","GHSA-xfq5-w38q-pc2x"],"related":[],"kind":"vulnerability","state":"published","title":"Nuxt server islands render `useHeadSafe` input without sanitisation","summary":"Nuxt is an open-source web development framework for Vue.js. From 3.13.0 until 4.6.2, the server-island renderer serializes raw useHeadSafe entry input into the island response without preserving the safe-input marker, and NuxtIsland later inserts that input into the page head as an ordinary entry. An application that passes attacker-controlled data to useHeadSafe in a .server.vue component or page, or in a component rendered through NuxtIsland, can therefore render values normally removed by the allowlist, including event-handler attributes or executable script content, resulting in stored cross-site scripting in the application origin. This issue is fixed in version 4.6.2 .","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Nuxt is an open-source web development framework for Vue.js. From 3.13.0 until 4.6.2, the server-island renderer serializes raw useHeadSafe entry input into the island response without preserving the safe-input marker, and NuxtIsland later inserts that input into the page head as an ordinary entry. An application that passes attacker-controlled data to useHeadSafe in a .server.vue component or page, or in a component rendered through NuxtIsland, can therefore render values normally removed by the allowlist, including event-handler attributes or executable script content, resulting in stored cross-site scripting in the application origin. This issue is fixed in version 4.6.2 .","source":"cvelist"},{"lang":"en","text":"## Impact\n\n`useHeadSafe` restricts head input to an allowlist of safe tags and attributes. For example, `bodyAttrs` is limited to `class` and `style`, event handler attributes are removed, and `<script>` tags are only kept for JSON types.\n\nWhen `useHeadSafe` is called inside a server island (a `.server.vue` component or page, or a component rendered with `<NuxtIsland>`), the island renderer serialises the raw input of every head entry into the island response without the option that marks it as safe input. `<NuxtIsland>` then pushes that input into the page's head as a regular entry, both during server rendering and when hydrating or refetching on the client.\n\nAs a result, input that `useHeadSafe` would normally strip (such as `bodyAttrs.onload` or executable `<script>` content) is rendered into the page. If an application passes user-controlled data to `useHeadSafe` inside a server island, an attacker who controls that data can achieve stored cross-site scripting on the application's origin.\n\n```vue\n<!-- components/AuthorMeta.server.vue -->\n<script setup lang=\"ts\">\nconst { data: author } = await useFetch('/api/author')\n// author.value.head is user-authored, e.g. { bodyAttrs: { onload: '...' } }\nuseHeadSafe(author.value.head)\n</script>\n```\n\n## Mitigating factors\n\n- Server components are experimental. They are only active when the application defines a `.server.vue` component or page, or enables `experimental.componentIslands` and renders `<NuxtIsland>`.\n- Exploitation requires the application to pass attacker-controlled data to `useHeadSafe` inside a server island. `useHeadSafe` called from regular (non-island) components and pages is not affected.\n\n## Affected versions\n\n`nuxt` `>=3.13.0`, when head support for server islands was introduced. Nuxt 2 is not affected.\n\n## Patches\n\nFixed in `nuxt@4.6.2`. Nuxt 3 reached end of life on 31 July 2026 and will not receive a fix.\n\nPatched releases apply Unhead's safe input filtering to `useHeadSafe` entries on the server before they are added to the island response, so `islandResponse.head` (including what `render:island` hooks see) only contains input that `useHeadSafe` allows.\n\n## Workarounds\n\nUpgrade to `nuxt@4.6.2`. If you cannot upgrade, including on Nuxt 3:\n\n1. Call `useHeadSafe` with untrusted input from a regular component or page rather than from inside a server island.\n2. Alternatively, validate untrusted head input against your own allowlist before passing it to `useHeadSafe` inside a server island.","format":"markdown","source":"ghsa"}],"published":"2026-10-21T17:52:09.381Z","modified":"2026-10-28T18:17:10.550Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 3.13.0, < 4.6.2","status":"affected"}],"vendor":"nuxt","product":"nuxt","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.13.0","status":"affected","fixed":"4.6.2"}],"ecosystem":"npm","package":"nuxt","purl":"pkg:npm/nuxt","source":"ghsa"}],"references":[{"url":"https://github.com/nuxt/nuxt/security/advisories/GHSA-xfq5-w38q-pc2x","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nuxt/nuxt/commit/493565e99451a0f52330b1f6b979254a4a39e5d0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nuxt/nuxt/releases/tag/v4.6.2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114133","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nuxt/nuxt","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-28T17:23:04.358Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-114133","url":"https://www.cve.org/CVERecord?id=CVE-2026-114133","licence":"CVE Terms of Use","modified":"2026-10-28T17:23:40.538Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xfq5-w38q-pc2x","url":"https://github.com/advisories/GHSA-xfq5-w38q-pc2x","licence":"CC-BY-4.0","modified":"2026-10-22T17:15:04.291Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-114133","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114133","licence":"Public domain","modified":"2026-10-28T18:17:10.550Z"}],"updatedAt":"2026-11-25T22:59:46.655Z","epss":{"score":0.00233,"percentile":0.15182,"date":"2026-12-01T12:00:22.000Z"}}