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.5.3.
Published: 2026-08-06
Score: 4.8 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The html_sanitize_ex sanitizer omits validation for the form and formaction attributes on <input> elements. An unauthenticated attacker can supply sanitized HTML that ties an existing form on the page to a malicious target by using a predictable form id and a cross‑origin absolute URL in formaction, and the attacker can obtain whatever data the victim submits, including credentials, because no scheme check is performed. This vulnerability does not execute script but permits sensitive data exfiltration through normal form submission pathways.

Affected Systems

Vendors: rrrene's html_sanitize_ex library. Affected versions: 0.3.1 up to, but not including, 1.5.3. Pages rendering sanitized content with any of these versions are vulnerable.

Risk and Exploitability

The CVSS score of 4.8 indicates moderate severity. The EPSS score is not available, and the vulnerability is not listed in CISA KEV, suggesting limited exploitation demand so far. An attacker can exploit the flaw by injecting sanitized <input> tags into any content processed by the library; no authentication or elevated privileges are required. If the target page contains a form with a predictable id, the injected form association creates a backdoor that redirects the form data to the attacker’s address.

Generated by OpenCVE AI on August 6, 2026 at 16:44 UTC.

Remediation

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.


OpenCVE Recommended Actions

  • Upgrade html_sanitize_ex to version 1.5.3 or later, which removes form and formaction from the allowed attribute list.
  • If an upgrade is not possible, replace calls to html_sanitize_ex with the basic_html/1, markdown_html/1, or strip_tags/1 scrapers that exclude those attributes, ensuring all sanitized HTML cannot contain form or formaction.
  • As a temporary measure on pages that cannot immediately change sanitization, remove the id attribute from all untrusted forms or change it to an unpredictable value so that injected form references cannot match.

Generated by OpenCVE AI on August 6, 2026 at 16:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 06 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
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.5.3.
Title html_sanitize_ex HTML5 scrubber keeps attacker-supplied form-association attributes, allowing form hijacking
First Time appeared Rrrene
Rrrene html Sanitize Ex
Weaknesses CWE-601
CPEs cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*
Vendors & Products Rrrene
Rrrene html Sanitize Ex
References
Metrics cvssV4_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'}


Subscriptions

Rrrene Html Sanitize Ex
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-08-06T14:49:15.841Z

Reserved: 2026-08-06T10:15:01.808Z

Link: CVE-2026-66370

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-06T16:45:07Z

Weaknesses
  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')