# CVE-2026-66370: html\_sanitize\_ex HTML5 scrubber keeps attacker-supplied form-association attributes, allowing form hijacking

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.8
- **CVSS:** 4.8 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: Active; Confidentiality impact: None; Integrity impact: None; Availability impact: None; Confidentiality impact on other systems: High; Integrity impact on other systems: Low; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.42% (percentile 28, 2026-11-26)
- **CWE:** CWE-601
- **Published:** 2026-08-06T14:49:15.841Z
- **Modified:** 2026-11-20T06:17:35.840Z

## Who should check

- Anyone running rrrene html\_sanitize\_ex \>= 0.3.1, \< 1.4.5; \>= 1.5.0-rc.0, \< 1.5.3
- Anyone running rrrene html\_sanitize\_ex \>= 8976d64ea0b77d26093a94a43ec48a3978e8d028, \< \*

## 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 \<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.

No 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.

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.

## Affected and fixed versions

- rrrene html\_sanitize\_ex: \>= 0.3.1, \< 1.4.5; \>= 1.5.0-rc.0, \< 1.5.3 (cvelist)
- rrrene html\_sanitize\_ex: \>= 8976d64ea0b77d26093a94a43ec48a3978e8d028, \< \* (cvelist)

## Mitigation

- Upgrade html\_sanitize\_ex to 1.5.3 or later.
- Vendor workaround: 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-66370. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-66370.md
Affected: rrrene html_sanitize_ex >= 0.3.1, < 1.4.5; >= 1.5.0-rc.0, < 1.5.3; rrrene html_sanitize_ex >= 8976d64ea0b77d26093a94a43ec48a3978e8d028, < *
Fixed in: rrrene html_sanitize_ex 1.4.5, rrrene html_sanitize_ex 1.5.3

Steps:
1. Search this machine and project for rrrene html_sanitize_ex: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-66370 being exploited?

There is no confirmed exploitation: CVE-2026-66370 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.42% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-66370?

Medium: CVSS 4.8 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-66370?

rrrene html\_sanitize\_ex \>= 0.3.1, \< 1.4.5; \>= 1.5.0-rc.0, \< 1.5.3; rrrene html\_sanitize\_ex \>= 8976d64ea0b77d26093a94a43ec48a3978e8d028, \< \*.

### Is there a fix for CVE-2026-66370?

Yes. Fixed in rrrene html\_sanitize\_ex 1.4.5, rrrene html\_sanitize\_ex 1.5.3. Upgrade html\_sanitize\_ex to 1.5.3 or later. Vendor workaround: 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.

### How do I check if I'm affected by CVE-2026-66370?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-w3f9-jjhw-wwvq>
- patch: <https://cna.erlef.org/cves/CVE-2026-66370.html>
- patch: <https://osv.dev/vulnerability/EEF-CVE-2026-66370>
- patch: <https://github.com/rrrene/html_sanitize_ex/commit/8976d64ea0b77d26093a94a43ec48a3978e8d028>
- patch: <https://github.com/rrrene/html_sanitize_ex/commit/21394e758cb0ffe12fb9953c30fdedc6016c8f9e>
- patch: <https://github.com/rrrene/html_sanitize_ex/commit/a1e804ed997e780ea71d14393cf2f701330553a6>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-66370>

HTML: <https://flawdb.com/CVE-2026-66370> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-66370>
