{"id":"CVE-2026-66370","aliases":["EEF-CVE-2026-66370","EUVD-2026-54081","GHSA-r8xc-fmjg-37c5","GHSA-w3f9-jjhw-wwvq"],"status":"published","title":"html_sanitize_ex HTML5 scrubber keeps attacker-supplied form-association attributes, allowing form hijacking","description":"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 \u003cinput\u003e 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.","severity":{"version":"4.0","score":4.8,"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00403,"percentile":0.34876,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-601"],"published":"2026-08-06T14:49:15Z","modified":"2026-10-28T02:30:53Z","fixes":[{"ecosystem":"Hex","package":"html_sanitize_ex","fixed_in":["1.4.5","1.5.3"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Hex","package":"html_sanitize_ex","ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.1"},{"fixed":"1.4.5"}]},{"type":"SEMVER","events":[{"introduced":"1.5.0-rc.0"},{"fixed":"1.5.3"}]}],"versions":["0.3.1","1.0.0","1.0.1","1.1.0","1.1.0-rc1","1.1.1","1.2.0","1.3.0","1.3.0-rc1","1.3.0-rc2","1.3.0-rc3","1.4.0","1.4.1","1.4.2","1.4.3","1.4.4","1.4.4-rc.0","1.5.0","1.5.0-rc.0","1.5.1","1.5.2"]}],"products":[{"vendor":"rrrene","product":"html_sanitize_ex"},{"vendor":"rrrene","product":"htmlsanitizeex"}],"references":[{"url":"https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-w3f9-jjhw-wwvq","tags":["vendor-advisory","related","Broken Link","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-66370.html","tags":["related","Patch","Third Party Advisory","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66370","tags":["related","Patch","Third Party Advisory","web"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/a1e804ed997e780ea71d14393cf2f701330553a6","tags":["patch","Patch","fix"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/21394e758cb0ffe12fb9953c30fdedc6016c8f9e","tags":["patch","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-66370","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-r8xc-fmjg-37c5"},{"url":"https://github.com","tags":["web"]},{"url":"https://repo.hex.pm","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/66xxx/CVE-2026-66370.json","tags":["advisory"]},{"url":"https://github.com/rrrene/html_sanitize_ex","tags":["package"]},{"url":"https://hex.pm/packages/html_sanitize_ex","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-66370","title":"html_sanitize_ex HTML5 scrubber keeps attacker-supplied form-association attributes, allowing form hijacking","description":"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 \u003cinput\u003e 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.","status":"published","published":"2026-08-06T14:49:15.841Z","modified":"2026-08-19T11:51:08.771Z","cvss":[{"version":"4.0","score":4.8,"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","level":"medium","assessor":"cna"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:20:13.272106Z"}],"euvd":[{"id":"EUVD-2026-54081","description":"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 \u003cinput\u003e 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.","status":"published","published":"2026-08-06T14:49:15Z","modified":"2026-08-19T11:51:08Z","cvss":[{"version":"4.0","score":4.8,"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","level":"medium"}],"updated_at":"2026-11-02T18:01:45.709762Z"}],"ghsa":[{"id":"GHSA-r8xc-fmjg-37c5","title":"URL Redirection to Untrusted Site ('Open Redirect') vulnerability in the HTML5 scrubber in rrrene...","description":"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 \u003cinput\u003e 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.5.3.","status":"published","published":"2026-08-06T18:30:49Z","modified":"2026-08-19T12:33:27Z","cvss":[{"version":"4.0","score":4.8,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:10:38.677871Z"}],"nvd":[{"id":"CVE-2026-66370","description":"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 \u003cinput\u003e 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.","status":"published","published":"2026-08-06T16:16:48.42Z","modified":"2026-10-24T16:10:00.153Z","cvss":[{"version":"4.0","score":4.8,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:12:35.386166Z"}],"osv":[{"id":"CVE-2026-66370","title":"html_sanitize_ex HTML5 scrubber keeps attacker-supplied form-association attributes, allowing form hijacking","description":"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 \u003cinput\u003e 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.","status":"published","published":"2026-08-06T14:49:15.841Z","modified":"2026-10-28T02:30:53.778410249Z","cvss":[{"version":"4.0","score":4.8,"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","level":"medium"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:45:14.46177Z"},{"id":"EEF-CVE-2026-66370","title":"html_sanitize_ex HTML5 scrubber keeps attacker-supplied form-association attributes, allowing form hijacking","description":"## 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 `\u003cinput\u003e` 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.","status":"published","published":"2026-08-06T14:49:15.841Z","modified":"2026-09-08T16:15:02.414621859Z","cvss":[{"version":"4.0","score":4.8,"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","level":"medium"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:46:33.520522Z"}]}}
