Vulnerability library
Security checkMarch 12, 2026

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

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Low severitynpmunhead

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

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:

  • Affected version(s): <= 2.1.10
  • Patched version(s): 2.1.11

References

Could your website be exposed too?

SmartScanner can check your website for Unhead Vulnerable to Bypass of URI Scheme Sanitization in makeTagSafe via Case-Sensitivity and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated March 12, 2026