{"id":"CVE-2025-29049","aliases":["GHSA-qwj6-q94f-8425"],"url":"https://o3.security/vulnerability/CVE-2025-29049","summary":"MathLive's Lack of Escaping of HTML allows for XSS","details":"### Summary\nDespite 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.\n\n### Details\nOverall in the code, other than in the `test` folder, no functions escaping HTML can be seen.\n\n### PoC\n1. Go to https://cortexjs.io/mathlive/demo/\n2. Paste either `\\htmlData{><img/onerror=alert(1)\"src=}{}` or `\\htmlData{x=\" ><img/onerror=alert(1) src>}{}` in the LaTeX textarea.\n\n### Impact\nMathLive users who render untrusted mathematical expressions could encounter malicious input using \\htmlData that runs arbitrary JavaScript, or generate invalid HTML.","published":"2025-04-01T00:00:00Z","modified":"2026-10-28T02:30:32.821016802Z","cvss":{"score":6.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"},"epss":{"score":0.00535,"percentile":0.42718,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"mathlive","fixedVersion":"0.104.0"}],"fix":{"url":"https://github.com/arnog/mathlive/commit/abc26056fd5e29a99edfa96a0bbe855ea2a8b678","label":"arnog/mathlive@abc2605"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/29xxx/CVE-2025-29049.json"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-qwj6-q94f-8425"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-29049"},{"type":"FIX","url":"https://github.com/arnog/mathlive/commit/abc26056fd5e29a99edfa96a0bbe855ea2a8b678"},{"type":"WEB","url":"https://github.com/arnog/mathlive/security/advisories/GHSA-qwj6-q94f-8425"},{"type":"PACKAGE","url":"https://github.com/arnog/mathlive"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:32.821016802Z"}}