{"id":"CVE-2026-66370","aliases":["CVE-2026-66370","EEF-CVE-2026-66370","GHSA-w3f9-jjhw-wwvq"],"related":[],"kind":"vulnerability","state":"published","title":"html_sanitize_ex HTML5 scrubber keeps attacker-supplied form-association attributes, allowing form hijacking","summary":"URL Redirection to Untrusted Site ('Open Redirect') vulnerability in the HTML5 scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to retarget a form already on the rendering page and receive whatever the victim submits, including credentials, via the form and formaction attributes on an <input> element in sanitized HTML. HTML's form attribute associates an input with any form on the page by its id even when the input sits outside that form, and formaction on a submit control overrides the owning form's action. Neither attribute receives a scheme check, so an absolute cross-origin URL survives sanitizing.\n\nNo script executes. The scrubber allows neither form nor button, so the attacker cannot introduce a form of their own and the rendering page must already contain a form carrying an id.\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":"URL Redirection to Untrusted Site ('Open Redirect') vulnerability in the HTML5 scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to retarget a form already on the rendering page and receive whatever the victim submits, including credentials, via the form and formaction attributes on an <input> element in sanitized HTML. HTML's form attribute associates an input with any form on the page by its id even when the input sits outside that form, and formaction on a submit control overrides the owning form's action. Neither attribute receives a scheme check, so an absolute cross-origin URL survives sanitizing.\n\nNo script executes. The scrubber allows neither form nor button, so the attacker cannot introduce a form of their own and the rendering page must already contain a form carrying an id.\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\nURL Redirection to Untrusted Site ('Open Redirect') vulnerability in the HTML5 scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to retarget a form already on the rendering page and receive whatever the victim submits, including credentials, via the `form` and `formaction` attributes on an `<input>` element in sanitized HTML. HTML's `form` attribute associates an input with any form on the page by its `id` even when the input sits outside that form, and `formaction` on a submit control overrides the owning form's `action`. Neither attribute receives a scheme check, so an absolute cross-origin URL survives sanitizing.\n\nNo script executes. The scrubber allows neither `form` nor `button`, so the attacker cannot introduce a form of their own and the rendering page must already contain a form carrying an `id`.\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 `input`, or define a custom scrubber that omits it.\n\nOmitting the `id` attribute from the page's own forms, or giving them values an attacker cannot predict, removes the anchor the injected `form` attribute needs.\n\n## Configurations\n\nOnly `HtmlSanitizeEx.html5/1`, and custom scrubbers declared with `use HtmlSanitizeEx, extend: :html5`, allow the `input` element, and the sanitized output must be rendered to other users.\n\nThe rendering page must also contain a form with an `id`, since that `id` is what the injected `form` attribute binds to.","format":"markdown","source":"eef"},{"lang":"es","text":"La vulnerabilidad de redirección de URL a sitio no confiable (’redirección abierta’) en el depurador HTML5 en rrrene html_sanitize_ex permite a un atacante remoto no autenticado redirigir un formulario ya presente en la página de renderizado y recibir lo que la víctima envíe, incluidas las credenciales, a través de los atributos form y formaction en un elemento [input] en HTML saneado. El atributo form de HTML asocia una entrada con cualquier formulario en la página por su id incluso cuando la entrada se encuentra fuera de ese formulario, y formaction en un control de envío anula la acción del formulario propietario. Ninguno de los atributos recibe una verificación de esquema, por lo que una URL absoluta de origen cruzado sobrevive al saneamiento.\n\nNo se ejecuta ningún script. El depurador no permite ni form ni button, por lo que el atacante no puede introducir un formulario propio y la página de renderizado ya debe contener un formulario con un id.\n\nEste problema afecta a html_sanitize_ex: desde 0.3.1 antes de 1.5.3.","source":"nvd"}],"published":"2026-08-06T14:49:15.841Z","modified":"2026-11-25T06:30:12.841Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N","score":4.8,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N","score":4.8,"rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:H/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-601"],"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":"21394e758cb0ffe12fb9953c30fdedc6016c8f9e"},{"type":"git","status":"affected","fixed":"a1e804ed997e780ea71d14393cf2f701330553a6"}],"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-w3f9-jjhw-wwvq","tags":["advisory","broken-link","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-66370.html","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66370","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/21394e758cb0ffe12fb9953c30fdedc6016c8f9e","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/a1e804ed997e780ea71d14393cf2f701330553a6","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:42:03.803Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-66370","url":"https://www.cve.org/CVERecord?id=CVE-2026-66370","licence":"CVE Terms of Use","modified":"2026-11-20T06:08:07.007Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-66370","url":"https://osv.dev/vulnerability/EEF-CVE-2026-66370","licence":"CC-BY-4.0","modified":"2026-11-25T06:30:12.841Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-66370","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-66370","licence":"Public domain","modified":"2026-11-20T06:17:35.840Z"}],"updatedAt":"2026-11-25T22:59:31.270Z","epss":{"score":0.00292,"percentile":0.2339,"date":"2026-12-01T12:00:22.000Z"}}