Vulnerability library
Security checkMarch 12, 2026

Unhead has XSS bypass in `useHeadSafe` via attribute name injection and case-sensitive protocol check

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmunhead

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

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 scan

Related Issues

See something that needs correcting? Let us knowUpdated March 12, 2026