Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-66843 — html-sanitize-ex

🟡 CVSS 6.1 — Medium ✅ No Known Exploit CWE-829 NVD
6.1
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

html_sanitize_ex HTML5 scrubber keeps attacker-supplied <object> elements, allowing untrusted content embedding

Summary

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.4.5 and from 1.5.0-rc.0 before 1.5.3.

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.

Configuration

Only HtmlSanitizeEx.html5/1, and custom scrubbers declared with use HtmlSanitizeEx, extend: :html5, allow the object element, and the sanitized output must be rendered to other users.

Script execution in the host origin additionally requires the application to serve attacker-controlled HTML from a same-origin path, such as an uploads directory served as text/html.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality low, integrity low, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: Required — someone has to click, open or visit something.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: Low — limited, and the attacker does not choose what is affected.
  • Availability impact: None.

Weakness class

CVE-2026-66843 is classified as CWE-829: Inclusion of Functionality from Untrusted Control Sphere. Code is loaded from a source outside the product's control, so that source can change what runs.

Affected software

CVE-2026-66843 is recorded against 2 packages.

  • html-sanitize-ex
  • htmlsanitizeex (from 0.3.1 up to 1.5.3)

Timeline and source

Published on 6 August 2026 and last revised on 19 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

github.com (Advisory)
cna.erlef.org (Web)
github.com (Fix)
github.com (Fix)
hex.pm (Package)

Other advisories for this package

html-sanitize-ex has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) in other software:

Details

Severity Medium
CVSS Score 6.1
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CWE CWE-829
Public Exploit ✅ No
Source NVD
Published 2026-08-06
Updated 2026-08-20
Modified 2026-08-19

Affected Packages

Software From version Fixed in
html-sanitize-ex — —
htmlsanitizeex 0.3.1 1.5.3

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in html-sanitize-ex

CVE-2026-66843 is rated CVSS 6.1 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓