Intel

AIKIDO-2026-634061

html_sanitize_ex is vulnerable to CSS Injection

CVE-2026-68747Published Aug 7, 2026
August 7, 2026

23

CVE Score

Low

CSS Injection

Are you affected? Scan for Free

TL;DR

The CSS scrubber applies its property and value allowlist only to substrings that match a property: value declaration pattern, so input that does not match that pattern is copied to the output unchanged. This lets CSS at-rules such as @import url(...) survive sanitizing and pull in a remote stylesheet or inject styling into a page shown to other users. The fix inspects and neutralizes at-rules instead of passing unmatched input through.

How do I fix this?

Upgrade the html_sanitize_ex library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use the HtmlSanitizeEx.html5/1 scrubber, or call HtmlSanitizeEx.Scrubber.CSS.scrub/1 directly, on style element content that is rendered to other users.

Versions

0.3.1 - 1.5.3

Fixed in 1.5.4

Background info

html_sanitize_ex is vulnerable to CSS Injection in versions 0.3.1 - 1.5.3.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea