LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-euclid
createdAtOct 11, 2026, 11:12 PM
updatedAtOct 11, 2026, 11:55 PM
githubUrlhttps://github.com/neomjs/neo/issues/19635
authorneo-gpt-euclid
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 11, 2026, 11:54 PM

Patch available dependency security fixes before v13.2

Closed v13.2.0/archive-v13-2-0-chunk-25 bugdependenciesaibuildsecurity
neo-gpt-euclid
neo-gpt-euclid commented on Oct 11, 2026, 11:12 PM

Context

The operator requested a pre-release Dependabot audit. At Engine dev b4f84d31c4f181fc774d259a795a6ca883f69114, four alerts are open:

Alert Package locked Advisory Patched version
246, 240 DOMPurify 3.4.15 GHSA-6688-9rhm-gjv2, GHSA-p98j-92pf-mc4p 3.4.16
245 KaTeX 0.16.47 GHSA-238p-pmpm-9mq7 0.18.2
247 sprintf-js 1.0.3 GHSA-hp3w-g68c-fv3c none published

The Problem

The two browser packages have available fixes, but the current parents do not select them. Monaco 0.57.0 exact-pins DOMPurify 3.4.15; Mermaid 12.1.0 declares DOMPurify ^3.4.12 and KaTeX ^0.16.47. A routine lock refresh cannot move KaTeX to 0.18.2 or satisfy Monaco's pin with 3.4.16.

The inspected DOMPurify calls use strings rather than the advisories' Node/IN_PLACE path. Mermaid sanitizes KaTeX output before insertion. This is bounded source evidence, not an assertion that every embedder is safe.

The Architectural Reality

buildScripts/build/mermaid.mjs bundles the core ESM dependency graph. buildScripts/build/monaco.mjs already replaces the editor's vendored sanitizer import with the npm-resolved package and rejects leftover vendor copies. Patched npm resolutions must be verified in generated browser artifacts, not just the lockfile.

npm's override rule applies at the project root. This ticket repairs the Engine repository's own install and generated artifacts; a published consumer does not inherit that block. The generated consumer-root adoption remains with the existing create-app #38 owner, and existing apps need equivalent root floors before claiming their own remediation. The release-note owner granted the existing-app advisory in the same PR; it sits in the first Upgrading from13.1 table so the fix and instruction merge atomically.

The sprintf package is under gray-matter → js-yaml 3.15.2 → argparse 1.0.10. Engine's frontmatter path calls safeLoad rather than the YAML CLI. No attacker-controlled format-string path was found in that source census; the unresolved alert remains visible.

Design authority: the published advisories' affected/fixed ranges and the existing browser-build owners. No architecture change.

The Fix

Use package.json overrides to establish DOMPurify 3.4.16 and KaTeX 0.18.2 floors, then regenerate the lockfile. Also refresh fast-uri 3.1.7 → 3.1.8 inside Ajv's existing ^3.0.1 range; no new override is required. Retain the existing gray-matter/js-yaml and lodash-es rules. Verify KaTeX's move beyond Mermaid's declared minor range through representative diagram/math rendering, and rebuild both browser bundles.

Acceptance Criteria

  • All Engine-root DOMPurify, KaTeX and fast-uri lock entries meet the advisory floors; existing unrelated overrides remain intact and the override guard passes.
  • The actual Monaco bundle reports the patched npm sanitizer with no vendored fallback; Mermaid bundles the patched DOMPurify and KaTeX inputs.
  • Monaco editor/sanitization and Mermaid diagram/math smoke checks pass with the new dependencies.
  • The remaining sprintf-js and braces findings have bounded source/exposure dispositions recorded; no alert is dismissed to simulate remediation.
  • The existing-app upgrade row states the root-floor boundary and preserves app-owned overrides; it merges with the dependency fix.
  • Post-merge: GitHub reevaluates the three patched-package alerts.

Additional npm-audit findings

The broader audit also reports fast-uri GHSA-hrr3-gc8f-f4qj and braces GHSA-vfj7-8cjw-p6xm. Dependabot records 239/241 as auto_dismissed; their absence from the open-alert page is not a clean npm audit.

fast-uri has a compatible patched 3.1.8 release and is included here. Braces latest remains affected 3.0.3 with no published patch. The inspected Engine/WDS defaults pass fixed developer-owned glob patterns; request paths are matching data, not patterns. This bounds the known entry path without certifying custom consumers. No library replacement or decade-old downgrade from npm audit fix is selected.

Contract Ledger

Surface Authority Behavior Fallback Evidence
npm dependency graph advisory floors / parent ranges DOMPurify ≥3.4.16, KaTeX ≥0.18.2, fast-uri ≥3.1.8 retain explicit unresolved advisories complete lock/tree and npm audit
generated browser assets Monaco npmSanitizer / Mermaid core ESM builders patched npm inputs execute in newly built assets build fails on a Monaco vendor fallback canonical bundles plus real wrapper/Portal smoke
unpatched tools upstream advisories and inspected call sites retain visible sprintf/braces findings with bounded exposure no fake fixed version or alert dismissal source census and recorded upstream state

Out of Scope

Replacing parsers, upgrading Monaco/Mermaid themselves, dependency-wide updates, changing sanitizer APIs, and claiming installed-site remediation before its deployment.

Avoided Traps

Scanner-only Monaco repair; silent KaTeX override beyond its parent range without a rendering check; treating development scope as no browser exposure; a fake sprintf patch floor.

Related

#18354, #19320, #14800. Decision Record impact: none; structure map N/A for dependency metadata.

Origin Session ID: 2d8feac7-c60d-4883-8059-37b6e148768b

Retrieval Hint: pre-release Dependabot DOMPurify KaTeX sprintf-js browser bundles

Sweeps: live open/PR and historical package searches found no equivalent; #18354 and #19320 are closed predecessors with different advisory floors. Own assignments: 17844, 15520 and 14230 do not own these packages. MC package queries were non-diagnostic; primary package/advisory evidence governs. Fresh tracker/A2A recency rechecked immediately before creation.

tobiu referenced in commit 0eec51e - "fix(deps): patch available security dependency floors (#19635) (#19636) on Oct 11, 2026, 11:54 PM
tobiu closed this issue on Oct 11, 2026, 11:54 PM