Skip to content

Commit 9307314

Browse files
committed
fix(deps): override katex to ^0.18.2 for GHSA-238p-pmpm-9mq7
No published mermaid admits the fixed line (11.16.1 declares ^0.16.45; 11.17.0 through 12.1.0 declare ^0.16.47), so this is an override past the dependent's declared range, not a dedupe. The selector follows the overrides block's header rule: floor at the advisory's 0.11.0, bound at the 0.19.0 caret boundary of the target line. The target resolves to 0.18.10 because npm deprecates 0.18.11. mermaid's only katex call (renderToString with throwOnError, displayMode and output) renders MathML through 0.18.10 in Chromium. Claude-Session: https://claude.ai/code/session_01VF48aw8RPG6wzDnMgp6rtw Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1f8f493 commit 9307314

2 files changed

Lines changed: 37 additions & 11 deletions

File tree

‎pnpm-lock.yaml‎

Lines changed: 6 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,3 +536,34 @@ overrides:
536536
# written. Transitive-only and dev-only: nothing publishable declares
537537
# undici, and both paths reach the tree through devDependencies.
538538
'ip-address@<11.0.0': '^10.5.1'
539+
# OSV 2026-10-06 (#21945, scheduled scan run 37407261685) — one advisory that
540+
# names a fixed version, so this is the "take the fix" path osv-scanner.toml's
541+
# header prescribes and NOT an exemption.
542+
# katex GHSA-238p-pmpm-9mq7 (2.1 low) — an inherited `Object.prototype.trust`
543+
# is read as an explicit `trust: true`, so a prototype pollution that
544+
# already exists elsewhere lets attacker math emit links or load external
545+
# resources. Range introduced:0.11.0 -> fixed:0.18.2, read from the OSV
546+
# offline npm database the scanner downloads. Flagged at the single
547+
# resolved copy 0.16.47.
548+
# ⚠️ Unlike the dedupes above, this is a FORCED upgrade past the dependent's
549+
# declared range. The one consumer is mermaid@11.16.1 (apps/docs declares
550+
# mermaid ^11.16.0), which declares katex ^0.16.45, and no published
551+
# mermaid admits the fix: 11.17.0 through 12.1.0 all declare ^0.16.47
552+
# (npm view, 2026-10-06). mermaid touches katex in one place, a lazy
553+
# `import("katex")` that calls the default export's renderToString() with
554+
# { throwOnError, displayMode, output } for a `$$...$$` label. The 0.17 and
555+
# 0.18 breaking changes (the internal __defineFunction API, prefixed
556+
# internal CSS classes) touch neither that call nor the outer `.katex`
557+
# class mermaid styles. Measured: a mermaid 11.16.1 flowchart with a
558+
# `$$...$$` label renders MathML through katex 0.18.10 in Chromium, under
559+
# the same initialize() options apps/docs/components/mermaid.tsx passes.
560+
# The target resolves to 0.18.10, not 0.18.11: 0.18.11 is deprecated on
561+
# npm ("Accidentally published with breaking changes"), and pnpm skips it.
562+
# Transitive-only and docs-only: nothing publishable declares katex, so
563+
# check-override-consistency.mjs lists it as an override it cannot
564+
# cross-check against a declared range — correct for this shape. The
565+
# floor is the advisory's 0.11.0; the bound is 0.19.0, the caret boundary
566+
# of the 0.18 target line, per this block's header rule — never `<0.18.2`.
567+
# Re-check when a mermaid release declares a katex range that admits
568+
# 0.18.2: the entry then turns into a dedupe and stays as the floor.
569+
'katex@>=0.11.0 <0.19.0': '^0.18.2'

0 commit comments

Comments
 (0)