CVE-2026-66843: html_sanitize_ex HTML5 scrubber keeps attacker-supplied `<object>` elements, allowing untrusted content embedding
Inclusion of Functionality from Untrusted Control Sphere vulnerability in the HTML5 scrubber in rrrene htmlsanitizeex allows a remote attacker to load a document of their choosing into a trusted page via the data attribute of an <object> element in sanitized HTML. object is the one URI-bearing element in lib/htmlsanitizeex/scrubber/html5.ex never registered through allowtagwithuriattributes/3, and its only guard is a prefix match on lowercase "javascript:", so mixed-case variants, data: URIs, protocol-relative URLs and same-origin paths all survive.
This is not unconditional cross-site scripting. A javascript: URL does not execute through <object data> in current browsers, data: documents load in an opaque origin, and host-origin script execution additionally requires the application to serve attacker-controlled content from a same-origin path.
This issue affects htmlsanitizeex: from 0.3.1 before 1.5.3.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
html_sanitize_exto a version that resolves this vulnerability.Fixed in 1.5.3 - Configuration
Update the HTML5 scrubber logic in lib/html_sanitize_ex/scrubber/html5.ex so <object> with attacker-controlled URI attributes is not preserved/allowed based on the current lowercase "javascript:" prefix-only guard; ensure <object> URI attributes cannot survive sanitization (this is the guard that currently allows javascript:, data:, protocol-relative, and same-origin paths to pass).
lib/html_sanitize_ex/scrubber/html5.ex URI-bearing <object> handling (javascript: prefix match) = Remove/deny keeping attacker-supplied <object> elements (especially for javascript:, data:, protocol-relative URLs, same-origin paths)
Event History
Frequently Asked Questions
What is the severity of CVE-2026-66843?
CVE-2026-66843 has a risk rating of 33, indicating a moderate severity vulnerability.
How do I fix CVE-2026-66843?
To fix CVE-2026-66843, ensure that your application properly sanitizes the use of `<object>` elements and only allows trusted content.
What software is affected by CVE-2026-66843?
CVE-2026-66843 affects the rrrene html_sanitize_ex library used for sanitizing HTML.
What are the potential impacts of CVE-2026-66843?
Exploiting CVE-2026-66843 could allow an attacker to embed untrusted content in a trusted web page, leading to security risks.
When was CVE-2026-66843 published?
CVE-2026-66843 was published on August 6, 2026.