Intel

AIKIDO-2026-11112

mathlive is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)GHSA-fm7p-gw32-828p Published 3 days ago

63

Medium Risk

This Affects:

JSmathlive
0.0.1 - 0.109.2
Fixed in 0.110.0
Are you affected? Scan for Free

TL;DR

mathlive converts LaTeX into HTML and MathML for the editor, convertLatexToMarkup, and <math-span> / <math-div> static elements. The \text{} and \mbox{} commands accept arbitrary characters that were concatenated into markup without HTML escaping in both output paths. When applications render untrusted LaTeX and insert the result into the DOM, payloads such as embedded <img> tags with event handlers can execute arbitrary JavaScript. The fix escapes text-mode content and MathML text nodes so angle brackets and ampersands cannot break out of element content.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

mathlive is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 0.109.2.

How to fix this

Upgrade the mathlive library to the patch version.