{"id":"CVE-2026-66843","aliases":["CVE-2026-66843","EEF-CVE-2026-66843","GHSA-xmm9-jc22-rcgj"],"related":[],"kind":"vulnerability","state":"published","title":"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.\n\nThis 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.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\nThis 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.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.3.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nInclusion 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.\n\nThis 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.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.3.\n\n## Workarounds\n\nSanitize with `basic_html/1`, `markdown_html/1` or `strip_tags/1`, none of which allow `object`, or define a custom scrubber that omits it.\n\nA 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.\n\n## Configurations\n\nOnly `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.\n\nScript 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`.","format":"markdown","source":"eef"},{"lang":"es","text":"La vulnerabilidad de inclusión de funcionalidad desde una esfera de control no confiable en el depurador HTML5 en rrrene html_sanitize_ex permite a un atacante remoto cargar un documento de su elección en una página confiable a través del atributo data de un elemento [object_tag] en HTML saneado. object es el único elemento que contiene URI en lib/html_sanitize_ex/scrubber/html5.ex nunca registrado a través de allow_tag_with_uri_attributes/3, y su única protección es una coincidencia de prefijo en ’javascript_disabled: ’ en minúsculas, por lo que variantes con mayúsculas y minúsculas, URIs data:, URLs relativas al protocolo y rutas del mismo origen sobreviven.\n\nEsto no es cross-site scripting incondicional. Una URL javascript_disabled: no se ejecuta a través de [object_tag] en los navegadores actuales, los documentos data: se cargan en un origen opaco, y la ejecución de scripts de origen de host requiere adicionalmente que la aplicación sirva contenido controlado por el atacante desde una ruta del mismo origen.\n\nEste problema afecta a html_sanitize_ex: desde 0.3.1 antes de 1.5.3.","source":"nvd"}],"published":"2026-08-06T14:48:20.513Z","modified":"2026-11-25T06:31:00.206Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","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","score":2.3,"rating":"LOW"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","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","score":2.3,"rating":"LOW"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","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"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-829"],"affected":[{"ranges":[{"type":"semver","introduced":"0.3.1","fixed":"1.4.5","status":"affected"},{"type":"semver","introduced":"1.5.0-rc.0","fixed":"1.5.3","status":"affected"}],"vendor":"rrrene","product":"html_sanitize_ex","package":"html_sanitize_ex","cpe":"cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*","repo":"https://github.com/rrrene/html_sanitize_ex","source":"cvelist"},{"ranges":[{"type":"git","introduced":"8976d64ea0b77d26093a94a43ec48a3978e8d028","fixed":"*","status":"affected"}],"vendor":"rrrene","product":"html_sanitize_ex","package":"rrrene/html_sanitize_ex","cpe":"cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*","repo":"https://github.com/rrrene/html_sanitize_ex","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.3.1","status":"affected","fixed":"1.4.5"},{"type":"semver","introduced":"1.5.0-rc.0","status":"affected","fixed":"1.5.3"}],"ecosystem":"Hex","package":"html_sanitize_ex","purl":"pkg:hex/html_sanitize_ex","source":"eef"},{"ranges":[{"type":"git","introduced":"8976d64ea0b77d26093a94a43ec48a3978e8d028","status":"affected","fixed":"bec27fec4de99e40c68c4285a610e09e791a3eaf"},{"type":"git","status":"affected","fixed":"ce038aa1af5a960d50f8eb5d368cc57bb2b9a9f0"}],"repo":"https://github.com/rrrene/html_sanitize_ex","source":"eef"},{"ranges":[{"status":"affected","introduced":"0.3.1","fixed":"1.5.3"}],"vendor":"rrrene","product":"htmlsanitizeex","cpe":"cpe:2.3:a:rrrene:htmlsanitizeex:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-xmm9-jc22-rcgj","tags":["advisory","broken-link","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-66843.html","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66843","tags":["patch","related","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/8976d64ea0b77d26093a94a43ec48a3978e8d028","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/bec27fec4de99e40c68c4285a610e09e791a3eaf","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/ce038aa1af5a960d50f8eb5d368cc57bb2b9a9f0","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/html_sanitize_ex","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","René Föhring"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-06T15:40:41.682Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-66843","url":"https://www.cve.org/CVERecord?id=CVE-2026-66843","licence":"CVE Terms of Use","modified":"2026-11-19T08:46:20.278Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-66843","url":"https://osv.dev/vulnerability/EEF-CVE-2026-66843","licence":"CC-BY-4.0","modified":"2026-11-25T06:31:00.206Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-66843","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-66843","licence":"Public domain","modified":"2026-11-19T09:17:50.740Z"}],"updatedAt":"2026-11-25T22:59:31.271Z","epss":{"score":0.003,"percentile":0.24517,"date":"2026-12-01T12:00:22.000Z"}}