KaTeX's \includegraphics does not escape filename
cve-program · CVE-2024-28245
PublishedKaTeX 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.
Read the publisher's advisoryeuvd · EUVD-2024-0914
PublishedKaTeX 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.
Read the publisher's advisorynvd · CVE-2024-28245
PublishedKaTeX 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.
Read the publisher's advisoryosv · GHSA-f98w-7cxr-ff2h
Published### Impact KaTeX users who render untrusted mathematical expressions could encounter malicious input using `\includegraphics` that runs arbitrary JavaScript, or generate invalid HTML. ### Patches Upgrade to KaTeX v0.16.10 to remove this vulnerability. ### Workarounds * Avoid use of or turn off the `trust` option, or set it to forbid `\includegraphics` commands. * Forbid inputs containing the substring `"\\includegraphics"`. * Sanitize HTML output from KaTeX. ### Details `\includegraphics` did not properly quote its filename argument, allowing it to generate invalid or malicious HTML that runs scripts. ### For more information If you have any questions or comments about this advisory: * Open an issue or security advisory in the [KaTeX repository](https://github.com/KaTeX/KaTeX/) * Email us at [email protected]
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2024-28245 · CVE overview and exploitation status
cve-program · CVE-2024-28245
- https://github.com/KaTeX/KaTeX/security/advisories/GHSA-f98w-7cxr-ff2h
- https://github.com/KaTeX/KaTeX/commit/c5897fcd1f73da9612a53e6b5544f1d776e17770
euvd · EUVD-2024-0914
- https://github.com/KaTeX/KaTeX/security/advisories/GHSA-f98w-7cxr-ff2h
- https://github.com/KaTeX/KaTeX/commit/c5897fcd1f73da9612a53e6b5544f1d776e17770
nvd · CVE-2024-28245
- https://github.com/KaTeX/KaTeX/commit/c5897fcd1f73da9612a53e6b5544f1d776e17770
- https://github.com/KaTeX/KaTeX/security/advisories/GHSA-f98w-7cxr-ff2h
osv · GHSA-f98w-7cxr-ff2h
Related changes
Linked by CVE identifierNo related changes are available here.