Vulnerabilities/

Unhead Vulnerable to Bypass of URI Scheme Sanitization in makeTagSafe via Case-Sensitivity

Severity:
Low

Description

The link.href check in makeTagSafe (safe.ts, line 68-71) 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.

Recommendation

Update the unhead package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
unhead
Anything's wrong? Let us know Last updated on March 12, 2026