Intel

AIKIDO-2026-10348

unhead is vulnerable to Cross-Site Scripting

Cross-Site ScriptingCVE-2026-31860 Published Mar 12, 2026

75

High Risk

This Affects:

JSunhead
0.0.1 - 2.1.10
Fixed in 2.1.11
Are you affected? Scan for Free

TL;DR

Affected versions of this package are affected by a cross-site scripting (XSS) vulnerability in the useHeadSafe() functionality. The implementation allows arbitrary data-* attribute names to pass validation without properly sanitizing the attribute key. Because attribute keys are later interpolated directly into server-side rendered HTML, an attacker can inject spaces into the attribute name to break out of the intended attribute and introduce additional HTML attributes such as event handlers. When a Nuxt application renders these tags in the <head>, malicious attributes (e.g., onload) may execute in the victim’s browser. This could allow an attacker to inject and execute arbitrary JavaScript when user-controlled metadata is processed using useHeadSafe().

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

unhead is vulnerable to Cross-Site Scripting in versions 0.0.1 - 2.1.10.

How to fix this

Upgrade the unhead library to the patch version.