Security mailing lists by PureSourceCode

CVE-2026-31873

MEDIUM 6.1CVSS 3.1

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

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.

Published
12 Mar 2026
Last modified
17 Jun 2026
Assigned by
security-advisories@github.com
NVD status
Analyzed
Weakness
CWE-79
Also known as
GHSA-5339-hvwr-7582
Sources
NVDJSONOSV GHSA-5339-hvwr-7582JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD security-advisories@github.com (Secondary) CVSS 3.1 NONE 0.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
OSV GitHub CVSS 3.1 NONE 0.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD unjs unhead
cpe:2.3:a:unjs:unhead:*:*:*:*:*:*:*:*
< 2.1.11 2.1.11
OSV npm unhead < 2.1.11 2.1.11

References

History

  • 25 Nov 2026 21:01 UTC · NVD: first stored (published 12 Mar 2026)
  • 25 Nov 2026 20:10 UTC · OSV: first stored (published 12 Mar 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.