HTML Injection Vulnerability in Unhead Document Manager by UnJS
CVE-2026-31860
5.3MEDIUM
What is CVE-2026-31860?
The Unhead document manager, developed by UnJS, has a vulnerability that allows attackers to inject arbitrary HTML attributes into the SSR-rendered tags. This critical issue arises from the useHeadSafe() function, which can be bypassed to manipulate the content, thus compromising the integrity of user-generated content. The acceptDataAttrs function on lines 16-20 of safe.ts fails to adequately validate HTML attribute keys, allowing malicious input to exploit the application. This flaw has been resolved in version 2.1.11.
Affected Version(s)
unhead < 2.1.11
