Skip to content

Update bundled KaTeX to reject inherited renderer options - #43

Merged
nwalters512 merged 1 commit into
masterfrom
nwalters512/fix-katex-inherited-options
Nov 4, 2026
Merged

nwalters512 merged 1 commit into
masterfrom
nwalters512/fix-katex-inherited-options

Conversation

@nwalters512

@nwalters512 nwalters512 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

Update the bundled KaTeX renderer from 0.16.22 to 0.18.10 to address GHSA-238p-pmpm-9mq7. Sketch labels can contain student-supplied math, and the renderer previously accepted an inherited trust option if another component had already polluted Object.prototype. KaTeX does not itself cause that prerequisite pollution; no standalone pollution path was identified in sketchresponse.

The update preserves the standalone sketchresponse JS/CSS asset entry points and includes a patch changeset. The lockfile also catches up its workspace version metadata to the existing 0.3.0 manifest. npm hoists the newly resolved KaTeX and its Commander CLI dependency to the root installation location; KaTeX remains declared only by the sketch_tool workspace.

The implementation and validation were performed with Codex.

Testing

  • Reproduced the issue using KaTeX extracted from the browser bundle we ship: a malicious link is blocked normally but rendered when Object.prototype.trust is polluted.
  • Verified the rebuilt distribution blocks that same inherited-option attack and still renders ordinary math labels.
  • Served the rebuilt JS/CSS over HTTP and loaded them in a DOM runtime; the expected standalone browser API is available without script errors.

@nwalters512
nwalters512 marked this pull request as ready for review November 4, 2026 15:19

@austinbillings-pl austinbillings-pl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 it!

@nwalters512
nwalters512 merged commit 675aed5 into master Nov 4, 2026
5 checks passed
@nwalters512
nwalters512 deleted the nwalters512/fix-katex-inherited-options branch November 4, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants