Intel

AIKIDO-2026-917504

lazy_html is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)CVE-2026-92106 Published 6 days ago

23

Low Risk

This Affects:

ELIXIRlazy_html
0.1.0 - 0.1.12
Fixed in 0.1.13
Are you affected? Scan for Free

TL;DR

LazyHTML.Tree.to_html/2 decides whether to escape an element's text children only from the tag name being style, script, or another raw text tag, without checking the element's namespace. An SVG or MathML style/script element can carry untrusted text with encoded character references, so serializing it back to HTML re-emits that text unescaped and reintroduces markup a tree based sanitizer already approved. Reparsing the serialized output after a to_tree/1 to postwalk/3 to to_html/2 round trip can turn that text into executing markup (mutation XSS). The fix tracks the element namespace through serialization and only treats style/script as raw text inside the HTML namespace.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you serialize parsed HTML trees that can contain untrusted SVG or MathML markup, for example when sanitizing HTML from an untrusted source.

Background info

lazy_html is vulnerable to Cross-Site Scripting (XSS) in versions 0.1.0 - 0.1.12.

How to fix this

Upgrade the lazy_html library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform