The lockfile no longer resolves a vulnerable katex. I did not run the typecheck or tests, so that part of the definition of done is unconfirmed.
The web app already depended on katex ^0.19.0, which is above the fixed 0.18.2. The vulnerable 0.16.47 came from a second copy nested under mermaid, which asks for ^0.16.47. I added a root overrides entry in package.json pinning katex to ^0.19.0. I then removed the nested mermaid/node_modules/katex entry from package-lock.json and re-resolved the lockfile. It now has a single katex at 0.19.0. The nested copy of commander 8.3.0 that only that old katex needed went with it.
I made no source changes. apps/web/app/components/docs/blocks.tsx already calls katex.renderToString with options that 0.19.0 accepts.
- Not verified: a full
npm ci,npm run typecheckand the test suites. Thenpm ciI started timed out in the foreground and may still be running in the background. - Not verified: that
mermaidrenders math correctly onkatex0.19 instead of the 0.16 line it declares.