Ad

CVE-2026-31873

MEDIUM CVSS 3.1: 6.1 EPSS 0.04%
Updated Mar 16, 2026
Unjs
Parameter Value
CVSS 6.1 (MEDIUM)
Affected Versions before 2.1.11
Fixed In 2.1.11
Type CWE-79 (Cross-Site Scripting (XSS))
Vendor Unjs
Public PoC No

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.

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Privileges Required
None
No privileges needed
User Interaction
Required
User action required

Impact Assessment

Confidentiality
Low
Partial data leak
Integrity
Low
Partial data modification
Availability
None
No disruption

CVSS Vector v3.1

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Unjs Unhead
cpe:2.3:a:unjs:unhead:*:*:*:*:*:*:*:*
2.1.11

Related Vulnerabilities