Intel

AIKIDO-2026-917504

lazy_html is vulnerable to Cross-Site Scripting (XSS)

CVE-2026-92106Published Oct 7, 2026
October 7, 2026

23

CVE Score

Low

Cross-Site Scripting (XSS)

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.

How do I fix this?

Upgrade the lazy_html library to the patch version.

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.

Package

Versions

0.1.0 - 0.1.12

Fixed in 0.1.13

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea