mathlive
Affected
- introduced
0, fixed0.104.0(semver)
Fixed versions
0.104.0
Fix
- Fixed version
0.104.0npm install [email protected]
Advisory
Also known as: CVE-2025-29049
MathLive's Lack of Escaping of HTML allows for XSS
Summary
Despite normal text rendering as LaTeX expressions, preventing XSS, the library also provides users with commands which may modify HTML, such as the \htmlData command, and the lack of escaping leads to XSS.
Details
Overall in the code, other than in the test folder, no functions escaping HTML can be seen.
PoC
\htmlData{><img/onerror=alert(1)"src=}{} or \htmlData{x=" ><img/onerror=alert(1) src>}{} in the LaTeX textarea.Impact
MathLive users who render untrusted mathematical expressions could encounter malicious input using \htmlData that runs arbitrary JavaScript, or generate invalid HTML.
Medium Basis: The source's own band: MODERATE
0, fixed 0.104.0 (semver)0.104.0
0.104.0npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0