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.
Overall in the code, other than in the test
folder, no functions escaping HTML can be seen.
\htmlData{><img/onerror=alert(1)"src=}{}
or \htmlData{x=" ><img/onerror=alert(1) src>}{}
in the LaTeX textarea.MathLive users who render untrusted mathematical expressions could encounter malicious input using \htmlData that runs arbitrary JavaScript, or generate invalid HTML.
{ "nvd_published_at": null, "cwe_ids": [ "CWE-116", "CWE-79" ], "severity": "MODERATE", "github_reviewed": true, "github_reviewed_at": "2025-01-21T21:17:52Z" }