{"id":"CVE-2026-66370","published":"2026-08-06T14:49:15Z","modified":"2026-11-20T06:08:07Z","title":"html_sanitize_ex HTML5 scrubber keeps attacker-supplied form-association attributes, allowing form hijacking","vendor":"rrrene","product":"html_sanitize_ex","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00416,"percentile":0.36787,"provenance":"source"},"cwes":[{"id":"CWE-601","name":"URL Redirection to Untrusted Site"}],"references":[{"url":"https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-w3f9-jjhw-wwvq","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-66370.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66370","tags":["related"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/8976d64ea0b77d26093a94a43ec48a3978e8d028","tags":["related"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/21394e758cb0ffe12fb9953c30fdedc6016c8f9e","tags":["patch"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/a1e804ed997e780ea71d14393cf2f701330553a6","tags":["patch"]}],"priority":{"score":10.7,"factors":[{"name":"EPSS percentile","points":7.36},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"rrrene","affectedVersions":[{"vendor":"rrrene","product":"html_sanitize_ex","versions":[">= 0.3.1, < 1.4.5",">= 1.5.0-rc.0, < 1.5.3"]},{"vendor":"rrrene","product":"html_sanitize_ex","versions":[">= 8976d64ea0b77d26093a94a43ec48a3978e8d028"]}],"fixedVersions":[{"vendor":"rrrene","product":"html_sanitize_ex","versions":["21394e758cb0ffe12fb9953c30fdedc6016c8f9e","a1e804ed997e780ea71d14393cf2f701330553a6"]}],"workarounds":{"items":["Sanitize with basic_html/1, markdown_html/1 or strip_tags/1, none of which allow input, or define a custom scrubber that omits it. Omitting 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."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-154","name":"Resource Location Spoofing"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-08-06T15:42:03.803831Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-54081","exploited":false,"provenance":"source"}}