Skip to content

fix(deps): ws 8.23.0 in the server and the relay (GHSA-37g9-w4hg-h9qr) - #83

Open
zereight wants to merge 1 commit into
mainfrom
fix/relay-ws-audit
Open

zereight wants to merge 1 commit into
mainfrom
fix/relay-ws-audit

Conversation

@zereight

@zereight zereight commented Dec 2, 2026

Copy link
Copy Markdown
Owner

What changed

ws goes from 8.22.0 to 8.23.0 in the server (package.json, pnpm-lock.yaml) and in the relay (relay/package.json, relay/pnpm-lock.yaml). This is upstream fca6bf9, cherry-picked with -x and unchanged. No source code changes.

Why

relay typecheck + tests + fuzz + audit fails at its first step, pnpm audit --prod --audit-level high:

│ high                │ ws: Memory exhaustion DoS via unbounded automatic pong │
│ Vulnerable versions │ >=8.0.0 <8.23.0                                        │
│ More info           │ https://github.com/advisories/GHSA-37g9-w4hg-h9qr      │
1 vulnerabilities found
Severity: 1 high

The relay's lockfile has not changed since 2026-11-11; the advisory is new. The nightly run 46621767146 still passed this audit, and #81's run 46788880591 failed it. main pushes skip the relay job, so it fails on every pull request that touches relay/ and on every nightly run until ws moves.

The server pins the same ws 8.22.0 (package.json:154) and uses it in server/routes/phone-screen.ts, server/device-links.ts, server/tts/openai.ts and server/browser/viewers/stream-v2.ts. CI does not audit the root, but it is the same advisory, so this PR moves both, as upstream did.

ws@8.21.0 stays in the root lockfile. It comes from miniflare, a dev dependency, and upstream left it too.

How it was verified

macOS, Node 24.22.1 (the CI version), pnpm 10.33.0. Before is relay/ from main 8c67e9d, extracted with git archive.

Before fails the audit; after passes it, typechecks, and the server's ws tests pass on 8.23.0.

check Before (main 8c67e9d) After (this branch)
relay: pnpm install --frozen-lockfile, installed ws 8.22.0 8.23.0
relay: pnpm audit --prod --audit-level high exit 1, 1 vulnerabilities found, Severity: 1 high exit 0, No known vulnerabilities found
relay: pnpm check (tsc -p tsconfig.json) not run (CI stops at the audit) exit 0
root: pnpm exec vitest run server/routes/phone-screen.test.ts server/tts/openai.test.ts server/browser-sites.test.ts companion/test/e2e/relay-client.test.ts — Test Files 4 passed (4), Tests 110 passed (110)

relay: RELAY_FUZZ_MS=20000 pnpm test on the branch gives tests 107, pass 105, fail 2. Neither failure comes from this change:

  • test/token.test.ts:17, "the copy is the pinned file…": the vectors checksum. The brand rename changed the pinned file, and it fails on main the same way (nightly run 46621767146). It is fixed separately.
  • test/fuzz.test.ts:282, "200 slow sockets": connect EADDRNOTAVAIL 127.0.0.1 on macOS. main's relay with ws 8.22.0 fails the same test locally (Error: could not connect, 50 ms, fuzz.test.ts alone with RELAY_FUZZ_MS=20000), so this is the local loopback, not the upgrade. Ubuntu CI on this PR is the check that counts here.

Not covered

  • The relay job on Ubuntu: this PR's CI is the first run of the relay tests with ws 8.23.0 on Linux.
  • The packaged app and the phone relay end to end; only the unit and e2e tests above ran.
  • Windows.

Checklist

  • One cause, one PR: the ws advisory only
  • Before / after evidence
  • No new tests, no workflow changes

…d automatic pong responses (GHSA-37g9-w4hg-h9qr)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit fca6bf9)
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