Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-31873— Unhead has a Bypass of URI Scheme Sanitization in makeTagSafe via Case-Sensitivity

Quick assessment

Affected
unjs unhead
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

unhead是UnJS开源的一个文档头和模板管理器。 unhead 2.1.11之前版本存在跨站脚本漏洞,该漏洞源于link.href检查对大小写敏感,可能导致攻击者注入任意CSS,用于UI伪装或通过CSS属性选择器进行数据渗漏。

EPSS 0.27% · P17
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-31873

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Unhead has a Bypass of URI Scheme Sanitization in makeTagSafe via Case-Sensitivity
Source: CVE Program / CVE List V5
Vulnerability Description
Unhead is a document head and template manager. Prior to 2.1.11, The link.href check in makeTagSafe (safe.ts) uses String.includes(), which is case-sensitive. Browsers treat URI schemes case-insensitively. DATA:text/css,... is the same as data:text/css,... to the browser, but 'DATA:...'.includes('data:') returns false. An attacker can inject arbitrary CSS for UI redressing or data exfiltration via CSS attribute selectors with background-image callbacks. This vulnerability is fixed in 2.1.11.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
在Web页面生成时对输入的转义处理不恰当(跨站脚本)
Source: CVE Program / CVE List V5
Vulnerability Title
unhead 跨站脚本漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
unhead是UnJS开源的一个文档头和模板管理器。 unhead 2.1.11之前版本存在跨站脚本漏洞,该漏洞源于link.href检查对大小写敏感,可能导致攻击者注入任意CSS,用于UI伪装或通过CSS属性选择器进行数据渗漏。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
unjs unhead < 2.1.11 -

II. Public POCs for CVE-2026-31873

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-31873

请登录查看更多情报信息。

Vendor Advisories for CVE-2026-31873 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-31873

No comments yet


Leave a comment