{"id":"CVE-2024-28245","aliases":["CVE-2024-28245","GHSA-f98w-7cxr-ff2h"],"related":[],"kind":"vulnerability","state":"published","title":"KaTeX's \\includegraphics does not escape filename","summary":"KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX users who render untrusted mathematical expressions could encounter malicious input using `\\includegraphics` that runs arbitrary JavaScript, or generate invalid HTML. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX users who render untrusted mathematical expressions could encounter malicious input using `\\includegraphics` that runs arbitrary JavaScript, or generate invalid HTML. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","source":"cvelist"},{"lang":"en","text":"### Impact\nKaTeX users who render untrusted mathematical expressions could encounter malicious input using `\\includegraphics` that runs arbitrary JavaScript, or generate invalid HTML.\n\n### Patches\nUpgrade to KaTeX v0.16.10 to remove this vulnerability.\n\n### Workarounds\n* Avoid use of or turn off the `trust` option, or set it to forbid `\\includegraphics` commands.\n* Forbid inputs containing the substring `\"\\\\includegraphics\"`.\n* Sanitize HTML output from KaTeX.\n\n### Details\n`\\includegraphics` did not properly quote its filename argument, allowing it to generate invalid or malicious HTML that runs scripts.\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* Open an issue or security advisory in the [KaTeX repository](https://github.com/KaTeX/KaTeX/)\n* Email us at katex-security@mit.edu","format":"markdown","source":"ghsa"},{"lang":"es","text":"KaTeX es una librería de JavaScript para la representación matemática de TeX en la web. Los usuarios de KaTeX que representan expresiones matemáticas que no son de confianza podrían encontrar entradas maliciosas utilizando `\\includegraphics` que ejecuta JavaScript arbitrario o generar HTML no válido. Actualice a KaTeX v0.16.10 para eliminar esta vulnerabilidad.","source":"nvd"}],"published":"2024-03-25T19:38:34.000Z","modified":"2026-09-10T03:50:10.498Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-116"],"affected":[{"ranges":[{"version":">= 0.11.0, < 0.6.10","status":"affected"}],"vendor":"KaTeX","product":"KaTeX","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0.11.0","fixed":"0.16.10","status":"affected"}],"vendor":"katex","product":"katex","cpe":"cpe:2.3:a:katex:katex:0.11.0:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.11.0","status":"affected","fixed":"0.16.10"}],"ecosystem":"npm","package":"katex","purl":"pkg:npm/katex","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.11.0","fixed":"0.16.10"}],"vendor":"katex","product":"katex","cpe":"cpe:2.3:a:katex:katex:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/KaTeX/KaTeX/security/advisories/GHSA-f98w-7cxr-ff2h","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/KaTeX/KaTeX/commit/c5897fcd1f73da9612a53e6b5544f1d776e17770","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28245","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/KaTeX/KaTeX","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-03-26T19:26:52.258Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-28245","url":"https://www.cve.org/CVERecord?id=CVE-2024-28245","licence":"CVE Terms of Use","modified":"2024-08-02T00:48:49.569Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f98w-7cxr-ff2h","url":"https://github.com/advisories/GHSA-f98w-7cxr-ff2h","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:10.498Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-28245","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28245","licence":"Public domain","modified":"2026-06-17T07:21:15.303Z"}],"updatedAt":"2026-11-25T22:58:37.886Z","epss":{"score":0.0055,"percentile":0.39692,"date":"2026-11-30T12:00:22.000Z"}}