Skip to content

fix(deps): update transitive KaTeX - #231

Open
zkoppert wants to merge 1 commit into
mainfrom
fix/dependabot-19-katex
Open

zkoppert wants to merge 1 commit into
mainfrom
fix/dependabot-19-katex

Conversation

@zkoppert

@zkoppert zkoppert commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Why

I upgraded the single affected dependency to KaTeX 0.18.10, above the patched minimum of 0.18.2.

What changed

I added an npm override scoped to micromark-extension-math and regenerated the lockfile. The update also moves KaTeX's Commander dependency to 15.0.0, which requires Node.js 22.12.0 or later.

Behavior Before After
Resolved KaTeX version 0.16.47 0.18.10
Inherited trust setting Can enable unsafe links and resource loading Ignored; explicit trust settings still work
Normal inline and display math Renders Still renders

Tradeoffs

I chose a scoped override because micromark-extension-math still requires KaTeX ^0.16.0. I kept unrelated dependency updates outside this fix.

Testing

I verified the fix locally on Node.js 26.8.2 with clean dependency installs and real KaTeX and micromark rendering.

  • I checked inline and display math, explicit trust policies, expansion limits, and command-line rendering.
  • I reproduced unsafe link execution and an untrusted image request to a local test server on the baseline. The patched version blocked both.
  • I checked inherited settings, setting metadata, and macro restoration against the patched renderer.
  • I confirmed that the npm audit result no longer includes KaTeX. Six unrelated audit findings remain.

Rollout

The dependency is development-only, so no application rollout or feature flag is needed.

I'll watch the CI workflow for dependency installation or Markdown tooling regressions. After merge, I'll check whether Dependabot closes the affected alert.

I require KaTeX 0.18.2 or newer for micromark-extension-math to address CVE-2026-103923. The lockfile resolves KaTeX 0.18.10 and its Commander dependency.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4d4fe4c6-b821-4449-99ea-80cd44d5b8f8
Signed-off-by: Zack Koppert <zkoppert@github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The override exceeds the parent dependency’s declared KaTeX compatibility range, so human confirmation is needed despite the reported validation.

No open issues 🎉

What changed in this PR

Updates development-only Markdown tooling dependencies to address CVE-2026-103923 in KaTeX.

Changes:

  • Adds a KaTeX override scoped to micromark-extension-math.
  • Locks KaTeX to 0.18.10 and Commander to 15.0.0, requiring Node.js 22.12.0 or later.
File Description
package.json Adds the scoped KaTeX override.
package-lock.json Records updated KaTeX and Commander dependencies.

Review effort: Max

@zkoppert zkoppert changed the title fix(deps): update transitive KaTeX for CVE-2026-103923 fix(deps): update transitive KaTeX Oct 20, 2026
@zkoppert
zkoppert marked this pull request as ready for review October 20, 2026 02:14
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