Description
useHeadSafe() can be bypassed to inject arbitrary HTML attributes, including event handlers, into SSR-rendered <head> tags. This is the composable that Nuxt docs recommend for safely handling user-generated content.
Recommendation
Update the unhead package to the latest compatible version. Followings are version details:
- Affected version(s): <= 2.1.10
- Patched version(s): 2.1.11
References
Could your website be exposed too?
SmartScanner can check your website for Unhead has XSS bypass in `useHeadSafe` via attribute name injection and case-sensitive protocol check and gives you actionable findings to investigate.
Start a free scanRelated Issues
- Unhead has a hasDangerousProtocol() bypass via leading-zero padded HTML entities in useHeadSafe() - CVE-2026-39315
- OpenZeppelin Contracts Wizard has Code Injection in Generated Hardhat and Foundry Tests via Unsanitized opts.name / opts - CVE-2026-48054
- Unhead Vulnerable to Bypass of URI Scheme Sanitization in makeTagSafe via Case-Sensitivity - CVE-2026-31873
- xmldom: Attribute name injection via setAttribute() bypasses requireWellFormed - xmldom - CVE-2026-83605


