Description
Inclusion of Functionality from Untrusted Control Sphere vulnerability in the HTML5 scrubber in rrrene html_sanitize_ex 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/html_sanitize_ex/scrubber/html5.ex never registered through allow_tag_with_uri_attributes/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 html_sanitize_ex: from 0.3.1 before 1.5.3.
Published: 2026-08-06
Score: 2.3 Low
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The HTML5 scrubber in rrrene:html_sanitize_ex does not remove <object> elements that use a data attribute, leaving an attacker able to request a document of their choice. Only a simple guard that checks for a lower‑case prefix of "javascript:" exists; alternative schemes such as data:, protocol‑relative URLs, mixed‑case "javascript:" or same‑origin paths are tolerated. Because a <object> data attribute does not execute JavaScript in modern browsers, this flaw does not provide unconditional XSS, but it does allow untrusted content to be embedded in a trusted page, potentially delivering hidden pages or malicious resources.

Affected Systems

The vulnerability affects any deployment of the html_sanitize_ex library older than version 1.5.3, specifically those from 0.3.1 up to and including 1.5.2. The vendor is rrrene.

Risk and Exploitability

The CVSS score is 2.3, and the EPSS score is not available; the flaw is not listed in the CISA KEV catalog, indicating a low severity and low exploit probability. A remote attacker can supply untrusted HTML that yields the insecure <object> tag when passed through the sanitizer. The attack path relies on user input or other untrusted content sources being cleaned with the default scrubber. While the browser will block execution of an object containing a javascript: URL, data: URIs will load in an opaque origin, and same‑origin paths require the application to host attacker‑controlled content at that origin. Deployment of a Content Security Policy with object-src 'none', hosting uploads on a separate origin, or leveraging recommended alternative scrubbers can effectively mitigate the risk. The flaw’s impact is limited to content injection rather than direct code execution or privilege escalation.

Generated by OpenCVE AI on August 6, 2026 at 16:58 UTC.

Remediation

Vendor Workaround

Sanitize with basic_html/1, markdown_html/1 or strip_tags/1, none of which allow object, or define a custom scrubber that omits it. A Content-Security-Policy of object-src 'none' blocks an injected <object> from loading, and hosting user uploads on a separate origin removes the escalation path.


OpenCVE Recommended Actions

  • Upgrade html_sanitize_ex to version 1.5.3 or later to eliminate unsafe object handling.
  • Add a Content Security Policy that sets object-src 'none' to block any unexpected object loading.
  • Replace the default scrubber with basic_html/1, markdown_html/1, or strip_tags/1, or create a custom scrubber that explicitly omits <object> elements.

Generated by OpenCVE AI on August 6, 2026 at 16:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 06 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Description Inclusion of Functionality from Untrusted Control Sphere vulnerability in the HTML5 scrubber in rrrene html_sanitize_ex 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/html_sanitize_ex/scrubber/html5.ex never registered through allow_tag_with_uri_attributes/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 html_sanitize_ex: from 0.3.1 before 1.5.3.
Title html_sanitize_ex HTML5 scrubber keeps attacker-supplied `<object>` elements, allowing untrusted content embedding
First Time appeared Rrrene
Rrrene html Sanitize Ex
Weaknesses CWE-829
CPEs cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*
Vendors & Products Rrrene
Rrrene html Sanitize Ex
References
Metrics cvssV4_0

{'score': 2.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

Rrrene Html Sanitize Ex
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-08-06T14:48:20.513Z

Reserved: 2026-08-06T09:00:01.259Z

Link: CVE-2026-66843

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-06T17:00:11Z

Weaknesses
  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere