Description
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in dashbitco lazy_html allows mutation XSS via a parse and serialize round-trip of attacker-supplied HTML.

LazyHTML.to_html/2 and LazyHTML.Tree.to_html/2 decide whether to escape an element's text from its tag name alone. A style or script element inside SVG or MathML foreign content is parsed with character references decoded, but is serialized as an HTML raw-text element, so its text is emitted unescaped. Encoded markup such as &lt;/style&gt;&lt;img src=x onerror=...&gt; inside <svg><style> therefore closes the element on re-parse and becomes live markup. Applications that parse untrusted HTML with lazy_html, filter the document or tree, and serialize it for display are affected, since the payload is a plain text node that no element or attribute filter sees.

This issue affects lazy_html: from 0.1.0 before 0.1.13.
Published: 2026-09-25
Score: 2.3 Low
EPSS: n/a
KEV: No
Impact: Cross‑Site Scripting (mutation XSS) that can execute arbitrary JavaScript in affected browsers
Action: Patch Upgrade
AI Analysis

Impact

LazyHTML’s parsing and serialization process treats text inside style or script elements that appear within SVG or MathML foreign content as raw text. When the library converts HTML to text, neutralises them incorrectly, attackers can inject markup that is later decoded and rendered as executable JavaScript after a round‑trip through lazy_html. The consequence is mutation XSS, allowing an attacker to run arbitrary code in the browser context of any user who views the rendered content. Based on the description, it is inferred that such code execution could enable credential theft, session hijacking, or other malicious actions.

Affected Systems

Dashbitco’s LazyHTML library, versions 0.1.0 through 0.1.12 inclusive, are affected. Any application that relies on these releases to parse, filter, or transform HTML content before rendering to a browser may be vulnerable.

Risk and Exploitability

The CVSS score of 2.3 indicates a low severity, although the context of use determines the real impact. The lack of an EPSS score means we cannot determine the probability of exploitation at this time, and the vulnerability is not listed in CISA KEV, indicating no known large‑scale exploitation. The likely attack vector involves an application accepting untrusted HTML, passing it through LazyHTML’s to_html or Tree.to_html, and ultimately displaying the output. An attacker could craft malicious SVG or MathML markup that contains embedded style or script elements with payload code, causing the text to be emitted unescaped and executed in the victim’s browser. The impact is confined to the application’s rendering context; based on typical XSS consequences, it is inferred that the severity could increase if the page has elevated privileges.

Generated by OpenCVE AI on September 25, 2026 at 11:00 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade LazyHTML to version 0.1.13 or later, which addresses the unescaped content handling in SVG and MathML.
  • Implement strict input filtering for SVG/MathML content, ensuring that style and script tags are removed or their contents are escaped before serialization.
  • Deploy a robust Content Security Policy that limits script execution, reducing the impact of any XSS payload that circumvents library safeguards.

Generated by OpenCVE AI on September 25, 2026 at 11:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 25 Sep 2026 09:45:00 +0000

Type Values Removed Values Added
Description Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in dashbitco lazy_html allows mutation XSS via a parse and serialize round-trip of attacker-supplied HTML. LazyHTML.to_html/2 and LazyHTML.Tree.to_html/2 decide whether to escape an element's text from its tag name alone. A style or script element inside SVG or MathML foreign content is parsed with character references decoded, but is serialized as an HTML raw-text element, so its text is emitted unescaped. Encoded markup such as &lt;/style&gt;&lt;img src=x onerror=...&gt; inside <svg><style> therefore closes the element on re-parse and becomes live markup. Applications that parse untrusted HTML with lazy_html, filter the document or tree, and serialize it for display are affected, since the payload is a plain text node that no element or attribute filter sees. This issue affects lazy_html: from 0.1.0 before 0.1.13.
Title lazy_html serializes SVG and MathML style and script text unescaped, allowing mutation XSS
First Time appeared Dashbitco
Dashbitco lazy Html
Weaknesses CWE-79
CPEs cpe:2.3:a:dashbitco:lazy_html:*:*:*:*:*:*:*:*
Vendors & Products Dashbitco
Dashbitco lazy Html
References
Metrics cvssV4_0

{'score': 2.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

Dashbitco Lazy Html
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-09-25T09:33:13.051Z

Reserved: 2026-09-21T12:15:01.326Z

Link: CVE-2026-92106

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-25T10:17:08.263

Modified: 2026-09-25T10:17:08.263

Link: CVE-2026-92106

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T11:15:05Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')