Oct 23, 2026·4 min read·9 visits
Nuxt Server Islands fail to preserve safe-input flags during serialization, bypassing useHeadSafe checks and enabling Stored XSS.
A Stored Cross-Site Scripting (XSS) vulnerability exists in Nuxt Server Island rendering logic when utilizing the useHeadSafe composable. Raw head attributes bypass sanitization during island serialization.
Nuxt versions from 3.13.0 up to (but excluding) 4.6.2 contain a Stored Cross-Site Scripting (XSS) flaw classified under CWE-79. The vulnerability exists within Nuxt's Server Island rendering subsystem, specifically in the component head serialization layer handled by the Nitro server runtime.
Nuxt Server Islands enable developers to render standalone components independently on the server using components like <NuxtIsland> or .server.vue source files. These components often collect document head metadata via composables such as useHeadSafe to inject dynamically defined attributes into the client HTML document.
When untrusted user input is passed through useHeadSafe inside a server island component, the server rendering runtime omits the safe input filtering stage. Consequently, unsafe HTML attributes and event handlers bypass validation and are serialized directly into the server response JSON, executing in the context of the user browser upon client-side hydration.
The root cause resides in the head metadata aggregation logic implemented in packages/nitro-server/src/runtime/handlers/island.ts. Unhead provides useHeadSafe to restrict dynamic metadata input to an allowlist of harmless attributes, internally flagging entries with _safe: true to invoke the SafeInputPlugin during tag resolution.
During server island processing, the Nitro server runtime extracts entries from ssrContext.head.entries. The server handler resolves reactive inputs using walkResolver(entry.input, VueResolver) and directly iterates over the resulting dictionary to assemble the output islandHead object.
In affected versions, the handler neglects to check whether entry.options?._safe is configured on the incoming head entry. As a consequence, the runtime skips invocation of @unhead/vue's SafeInputPlugin, leaving malicious attributes (such as onload or inline <script> contents) intact inside the generated JSON response payload.
In affected versions of packages/nitro-server/src/runtime/handlers/island.ts, the renderIsland function processed head metadata without invoking input sanitization filtering rules:
// Vulnerable code path in island.ts
const input = walkResolver(entry.input, VueResolver) as SerializableHead
for (const [key, value] of Object.entries(input)) {
// Head properties merged directly without checking entry.options?._safe
}The fix introduced in commit 493565e99451a0f52330b1f6b979254a4a39e5d0 adds dedicated sanitization logic in packages/nitro-server/src/runtime/utils/island-head.ts via toSafeHeadInput():
// Patched logic in island.ts
const input = walkResolver(entry.input, VueResolver) as SerializableHead
for (const [key, value] of Object.entries(entry.options?._safe ? toSafeHeadInput(input) : input)) {
// Process sanitized head entries
}The helper function toSafeHeadInput instantiates a server-side Unhead instance with SafeInputPlugin, registers the input with { _safe: true }, and evaluates resolveTags(head) to strip disallowed event handlers and script tags before serializing the final island response.
Exploitation requires an application pattern where user-supplied input is rendered inside a Nuxt Server Island component using the useHeadSafe composable. An authenticated user or attacker submits malicious attribute data stored in the application backend.
Consider a server island component UserProfile.server.vue that sets metadata based on user preferences:
<script setup lang="ts">
const props = defineProps<{ userStyle: string }>()
useHeadSafe({
bodyAttrs: {
class: 'user-profile',
onload: props.userStyle // Attacker value: "alert(document.cookie)"
}
})
</script>When a victim navigates to the target page, the server renders the island component and generates an HTTP response containing raw JSON metadata with the unsanitized onload handler. When the client runtime processes the payload, the script executes automatically in the origin context.
The vulnerability yields Stored Cross-Site Scripting with a CVSS v3.1 score of 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N). Successful execution allows attackers to run arbitrary client-side JavaScript within the origin session of visiting users.
Impact includes session token extraction, session hijacking, defacement, and unauthorized actions executed on behalf of affected users. The scope change (S:C) reflects the execution of injected JavaScript within the victim browser DOM context.
Currently, EPSS score stands at 0.00176 (0.18th percentile), and CISA KEV does not list active exploitation in the wild. However, applications rendering user input inside Server Islands are directly exposed until updated.
Maintainers resolved the flaw in Nuxt release version 4.6.2. Application teams must upgrade dependencies across affected packages to version 4.6.2 or higher.
Execute dependency updates using the primary package manager:
# pnpm
pnpm update nuxt@^4.6.2
# npm
npm install nuxt@^4.6.2
# yarn
yarn add nuxt@^4.6.2In addition to upgrading, enforce strict input sanitization prior to passing user control data into framework composables. Implement a strict Content Security Policy (CSP) with nonces or strict script-src rules to restrict execution of inline scripts.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
nuxt Nuxt | >= 3.13.0, < 4.6.2 | 4.6.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Attack Vector | Network (AV:N) |
| CVSS v3.1 Score | 5.4 (Medium) |
| EPSS Score | 0.00176 (0.18%) |
| Impact | Stored Cross-Site Scripting (XSS) |
| Exploit Status | None / No active weaponized code in the wild |
| CISA KEV Status | Not Listed |
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.
A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.
A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.
CVE-2026-12411 is a broken access control vulnerability in the DevLXD interface of Canonical LXD versions 6.6 through 6.8. The flaw resides in the devLXDInstancePatchHandler component, which fails to verify storage volume ownership when an instance attaches a new disk device via the /dev/lxd guest socket. When the security.devlxd.management.volumes configuration option is enabled, an untrusted guest or DevLXD identity can issue a crafted HTTP PATCH request referencing another tenant's custom storage volume. The LXD host daemon subsequently mounts the target volume into the requesting guest, permitting unauthorized cross-tenant read and write operations.
CVE-2026-105769 (GHSA-5q7h-w9jf-cx97, GO-2026-6225) is an origin validation error and credential exfiltration vulnerability affecting Kaniko prior to version 1.25.20. The flaw stems from an unanchored regular expression in the integrated Azure Container Registry (ACR) credential helper (github.com/chrismellard/docker-credential-acr-env). When Kaniko processes a Dockerfile containing an image reference hosted on a lookalike domain containing an ACR suffix as a substring (e.g., x.azurecr.io.attacker.com), the credential helper acquires a Microsoft Entra ID access token for Azure Resource Manager and transmits it via HTTP POST to the attacker-controlled host.
CVE-2026-62300 is an uncontrolled resource consumption vulnerability (CWE-400) affecting the daemon mode of filecoin-pin in versions up to and including 1.1.0. The daemon implements the IPFS Pinning Service API to store content on Filecoin's Proof of Data Possession (PDP) service. Due to the absence of rate limits, concurrency caps, execution timeouts, and Directed Acyclic Graph (DAG) traversal limits, an authenticated user—or an unauthenticated user when authentication is disabled—can exhaust system resources via crafted POST /pins requests.