CVE-2026-92106: lazy_html serializes SVG and MathML style and script text unescaped, allowing mutation XSS

Published Sep 25, 2026
·
Updated

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

LazyHTML.tohtml/2 and LazyHTML.Tree.tohtml/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 lazyhtml, 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 lazyhtml: from 0.1.0 before 0.1.13.

Affected Software

1 affected component
hex/lazy_html>=0.1.0<0.1.13

Event History

Sep 25, 2026
CVE Published
via MITRE·09:33 AM
Data Sourced
via MITRE·09:33 AM
DescriptionWeakness
Data Sourced
via NVD·10:17 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications are affected when they parse attacker-controlled HTML with lazy_html, optionally filter the document or tree, and then serialize it for display. Filters limited to elements or attributes may miss the payload because it is initially represented as a plain text node.

2

What does an attacker need to exploit it?

An attacker needs a way to supply HTML that the application sends through a lazy_html parse-and-serialize round trip. The payload uses encoded markup in a style or script element within SVG or MathML foreign content, which can become active markup when the serialized output is parsed again.

3

Are all lazy_html versions affected?

Versions from 0.1.0 before 0.1.13 are affected. Version 0.1.13 is not listed as affected.

4

How can I determine whether my application is vulnerable?

Check whether your application uses LazyHTML.to_html/2 or LazyHTML.Tree.to_html/2 after parsing untrusted HTML, especially where the resulting HTML is rendered in a browser. Test whether encoded closing tags and markup inside SVG or MathML style or script content are emitted unescaped and become live elements after browser parsing.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203