CVE-2026-54705 mathlive's Lack of Escaping of HTML allows for XSS

Medium 6.3 Published Updated

Attackers can execute arbitrary JavaScript via unescaped LaTeX text commands in MathLive, affecting web applications using this library.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-54705?

CVE-2026-54705 is a medium-severity cross-site scripting vulnerability in arnog mathlive, published on 29 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

MathLive provides web components for math display and input. Prior to 0.110.0, MathLive fails to escape text-mode content in \text{} and \mbox{} commands in Box.toMarkup at src/core/box.ts, in xmlEscape, scanText, and text-mode output in src/formats/atom-to-math-ml.ts, and through convertLatexToMarkup, convertLatexToMathMl, <math-span>, <math-div>, and the default identity MathfieldElement.createHTML, allowing malicious input to run arbitrary JavaScript when rendered. This issue is fixed in version 0.110.0.

Weakness: CWE-116

Which versions are affected by CVE-2026-54705?

2 open source packages ship an affected version, including mathlive.

PackageAffectedFixed in
mathlive npmAll versions0.110.0
mathlive npmAll versions0.110.0

How do I fix CVE-2026-54705?

Upgrade mathlive to 0.110.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-54705 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54705 exists.

Sources

Also known as GHSA-fm7p-gw32-828p.

Is CVE-2026-54705 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free