Skip to content

fix(deps): pin protobufjs 7 + ws 8.21 via overrides (clears critical + 7 highs) - #112

Closed
catomean wants to merge 1 commit into
mainfrom
deps/protobufjs-override
Closed

fix(deps): pin protobufjs 7 + ws 8.21 via overrides (clears critical + 7 highs)#112
catomean wants to merge 1 commit into
mainfrom
deps/protobufjs-override

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

What

Two transitive-only overrides bumps — no application code changes:

Package Before → After Clears
protobufjs 6.11.47.6.5 1 CRITICAL + 6 HIGH + mediums
@protobufjs/utf8 (transitive of ↑) 1.1.01.1.2 1 medium
ws 8.19.08.21.1 1 HIGH (DoS) + medium

Why an override, not the transformers v3 migration

The vulnerable protobufjs is v6, and there is no patched 6.x — the critical requires ≥ 7.5.5. It's pulled purely transitively:

@xenova/transformers@2.17.2 → onnxruntime-web@1.14.0 → onnx-proto@4.0.4 → protobufjs@6.11.4

onnxruntime-web is the browser ONNX backend. Botsmann runs embeddings server-side (lib/embeddings.ts, Xenova/all-MiniLM-L6-v2) via onnxruntime-node (native bindings) — so onnx-proto/protobufjs is never executed at runtime. Forcing protobufjs 6→7 therefore carries no runtime risk here, and avoids the breaking @xenova/transformers v2→v3 migration (package rename to @huggingface/transformers) that would otherwise be the only other way off protobufjs 6.

ws is pulled via @supabase/realtime-js and jsdom, both on ^8 — 8.21.1 is patch-compatible.

Verification

  • npm ls — single copies: protobufjs@7.6.5, @protobufjs/utf8@1.1.2, ws@8.21.1
  • npm audit — protobufjs and ws no longer flagged
  • @xenova/transformers still imports cleanly server-side (module graph resolves with protobufjs 7)
  • next build green

Scope note

Combined with #111 (Next 15) this closes the next + protobufjs + ws Dependabot highs. The remaining open transitive highs on this repo — picomatch, handlebars, fast-xml-parser, flatted, minimatch (all dev/build-tooling) — are the same override technique but each needs per-package version care (e.g. picomatch's 2.x-vs-4.x split); they belong in a separate focused PR, not this one.

🤖 Generated with Claude Code

…+ 7 highs)

Transitive-only override bumps — no runtime code change:
- protobufjs 6.11.4 → 7.6.5: clears the CRITICAL (protobufjs < 7.5.5) plus
  6 HIGH + several MEDIUM alerts. Also pulls @protobufjs/utf8 1.1.0 → 1.1.2
  (clears its MEDIUM). protobufjs is pulled only via
  @xenova/transformers → onnxruntime-web → onnx-proto, which is the BROWSER
  ONNX backend; botsmann runs embeddings server-side (lib/embeddings.ts)
  through onnxruntime-node (native), so this proto/JS path is never
  executed — the 6→7 major is zero-risk here. Verified: transformers still
  imports cleanly and `next build` is green.
- ws 8.19.0 → 8.21.1: clears the HIGH (DoS) + MEDIUM. Pulled via
  @supabase/realtime-js and jsdom, both on ^8 — patch-compatible.

Avoids the breaking @xenova/transformers v2→v3 migration (package rename to
@huggingface/transformers) that would otherwise be needed just to move
protobufjs off 6.x. Chosen because the vulnerable path is not executed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@catomean

Copy link
Copy Markdown
Collaborator Author

Superseded by the consolidated security-overrides PR rebased onto Next 16 main (landed as the merge including sharp ^0.35.3 + the full override set). protobufjs/ws are included.

@catomean catomean closed this Jul 26, 2026
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.

1 participant