CVE-2026-68747: CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in rrrene html_sanitize_ex
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.
AI Analysis
Technical Summary
The vulnerability in rrrene html_sanitize_ex's CSS scrubber (html_sanitize_ex.Scrubber.CSS.scrub/1) stems from improper neutralization of special elements in output used by downstream components, classified as CWE-74. The scrubber applies a property and value allowlist using Regex.replace only on substrings matching property:value declarations, ignoring other CSS constructs. This allows injection of CSS at-rules such as '@import url(//attacker.example/style.css);' which bypass filtering and are included in sanitized output. Element boundaries are resolved before sanitization, preventing injected content from escaping the <style> tag or executing scripts. This affects versions from 0.3.1 before 1.5.4.
Potential Impact
An attacker can inject CSS at-rules into pages served to other users, potentially causing unintended styling or loading of remote stylesheets. However, the injected content cannot escape the <style> element nor execute scripts, limiting the impact to CSS injection without direct script execution or code injection. The CVSS 4.0 base score is 2.3, indicating low severity.
Mitigation Recommendations
No official patch or remediation level is currently available. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is released, users should be cautious when using affected versions and consider additional filtering or sanitization measures to block CSS at-rules such as '@import'.
CVE-2026-68747: CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in rrrene html_sanitize_ex
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.
CVSS v4.0
Score 2.3low
Affected software
rrrene
html_sanitize_ex
rrrene
html_sanitize_ex
pkg:hex/html_sanitize_excpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in rrrene html_sanitize_ex's CSS scrubber (html_sanitize_ex.Scrubber.CSS.scrub/1) stems from improper neutralization of special elements in output used by downstream components, classified as CWE-74. The scrubber applies a property and value allowlist using Regex.replace only on substrings matching property:value declarations, ignoring other CSS constructs. This allows injection of CSS at-rules such as '@import url(//attacker.example/style.css);' which bypass filtering and are included in sanitized output. Element boundaries are resolved before sanitization, preventing injected content from escaping the <style> tag or executing scripts. This affects versions from 0.3.1 before 1.5.4.
Potential Impact
An attacker can inject CSS at-rules into pages served to other users, potentially causing unintended styling or loading of remote stylesheets. However, the injected content cannot escape the <style> element nor execute scripts, limiting the impact to CSS injection without direct script execution or code injection. The CVSS 4.0 base score is 2.3, indicating low severity.
Mitigation Recommendations
No official patch or remediation level is currently available. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is released, users should be cautious when using affected versions and consider additional filtering or sanitization measures to block CSS at-rules such as '@import'.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-07-31T13:23:00.355Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a74ab42bf8831d539ec74eb
Added to database: 08/06/2026, 15:41:54 UTC
Last enriched: 08/13/2026, 17:15:37 UTC
Last updated: 09/17/2026, 22:01:37 UTC
Views: 59
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.