chore(security): bump transitive deps to clear high/critical npm advisories - #2949
chore(security): bump transitive deps to clear high/critical npm advisories#2949Pierre-Gilles wants to merge 1 commit into
Conversation
…sories Regenerated package-lock.json for services/mcp and services/google-cast via `npm audit fix` (no --force) to pick up non-breaking transitive version bumps that resolve high/critical severity advisories. No package.json ranges changed.
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2949 +/- ##
=======================================
Coverage 99.52% 99.52%
=======================================
Files 1243 1243
Lines 89642 89642
=======================================
Hits 89216 89216
Misses 426 426 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Deploying gladys-plus with
|
| Latest commit: |
b05796f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9855a0ba.gladys-plus.pages.dev |
| Branch Preview URL: | https://chore-security-audit-2026-08-n9tv.gladys-plus.pages.dev |
|
🐳 A Docker image has been built for this branch and pushed to the GitHub Container Registry. You can test this pull request (AMD64 only) by pulling the image below: For example, run it with: sudo docker run -d \
--log-driver json-file \
--log-opt max-size=10m \
--cgroupns=host \
--restart=always \
--privileged \
--network=host \
--name gladys-chore-security-audit-2026-08-18 \
-e NODE_ENV=production \
-e SERVER_PORT=80 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant:/var/lib/gladysassistant \
-v /dev:/dev \
-v /run/udev:/run/udev:ro \
ghcr.io/gladysassistant/gladys-preview:chore-security-audit-2026-08-18This comment and the image are automatically updated on every new commit pushed to this pull request. Need an ARM64 image (Raspberry Pi, Apple Silicon, …)? Comment |
There was a problem hiding this comment.
Review of b05796f — lockfile-only security bumps for services/mcp and services/google-cast.
This is essentially a re-run of #2854, which is still open with changes requested for the same MCP SDK reconnect break. The two lockfiles were also pulled into #2819 and then explicitly reverted (b4a1bee / bdfbfdb). Shipping the bump again without the application-level workaround will break production MCP.
Blocking — @modelcontextprotocol/sdk 1.25.3 → 1.30.0
- Gladys keeps a single
McpServerincreateServerand, on every HTTP / Gladys Plusmcp-webhookhit, doesnew StreamableHTTPServerTransport+mcpHandler.server.connect(transport)(mcp.proxy.js). - GHSA-345p-7cg4-v4c7 is fixed from 1.26.0 by making
Protocol.connect()throw if a transport is already attached (Already connected to a transport…). That is exactly Gladys’s reuse pattern. Overlapping requests (two MCP clients, chat + local proxy, or a second call beforeres.on('close')→transport.close()clears_transport) become hard 500s. - The advisory’s workaround is a fresh
McpServerper request/session, plus a real-SDK test. Mocha still stubsStreamableHTTPServerTransport, so “150 passing” does not exercise 1.30.0 or@hono/node-server. @hono/node-server1 → 2 is on the live path:streamableHttp.jsstill callsgetRequestListenerfor Node↔Web Standard conversion (engines≥20is fine on Gladys Node 22).
Please either:
- Revert
server/services/mcp/package-lock.jsonuntil application code creates a freshMcpServer(or fullyclose()s before reconnect) with an integration test that hits the real SDK; or - Ship that code change in the same PR as the lockfile bump.
Also consider closing one of #2854 / this PR so the same lockfile fight is not reviewed twice.
Google Cast (bonjour 3.5.0 → 3.5.1 → multicast-dns 6→7 / dns-packet 1→5)
- Stealth majors on the discovery stack used by
google_cast.scan.js; mocha mocksbonjour, so LAN mDNS is untested. - Mitigating:
server/services/airplayonmasteralready resolvesbonjour@3.5.1/multicast-dns@7.2.5/dns-packet@5.6.1. Closer to parity than a green-field jump, but it should not be sold as “non-breaking” without a LAN smoke. - Collateral plus:
protobufjs6.11.4 → 6.11.6 backports GHSA-xq3m-2v4x-88gg (CVE-2026-41242). The arbitration table still lists acastv2-clientmajor for that RCE — the lockfile may already have closed it (npm audit can lag on the 6.11.6 range).
Other
- Integrity hashes for the bumped packages match the npm registry.
- No
package.json/ app-code /constants.jsdevice-category changes. - Residual audit items in the PR body remain follow-ups; this PR is not “audit complete”.
Verdict: Requesting changes. Labeling risk:high (MCP production path can 500) and needs:human-review; requesting @atrovato (author is Pierre-Gilles). needs:cursor-review was not present.
Sent by Cursor Automation: Automatic PR review
| "version": "1.25.3", | ||
| "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.25.3.tgz", | ||
| "integrity": "sha512-vsAMBMERybvYgKbg/l4L1rhS7VXV1c0CtyJg72vwxONVX0l4ZfKVAnZEWTQixJGTzKnELjQ59e4NbdFDALRiAQ==", | ||
| "version": "1.30.0", |
There was a problem hiding this comment.
Blocking: this resolves GHSA-345p-7cg4-v4c7 by making Protocol.connect() throw if a transport is already attached (fixed in 1.26.0).
Gladys still uses one shared McpServer (createServer) and calls mcpHandler.server.connect(transport) on every request in mcp.proxy.js (HTTP /api/v1/service/mcp/proxy and Gladys Plus mcp-webhook). That is the pattern the advisory forbids. Concurrent or overlapping calls will 500 with Already connected to a transport… instead of silently mis-routing.
The documented workaround is a new McpServer + transport per request/session, plus a test that uses the real SDK. Current mocha stubs StreamableHTTPServerTransport, so service tests cannot catch this.
Same bump was reverted in #2819 (bdfbfdb) and blocked again on #2854. Please revert this lockfile, or ship the app fix in the same diff. Do not treat ^1.25.3 → 1.30.0 as a non-breaking audit fix.
| "version": "1.19.9", | ||
| "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz", | ||
| "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==", | ||
| "version": "2.1.1", |
There was a problem hiding this comment.
@hono/node-server 1.19.9 → 2.1.1 is a real major (SDK now allows ^1.19.9 || ^2.0.5; audit fix picked v2).
This is on the production path: MCP SDK streamableHttp.js uses getRequestListener to convert Node IncomingMessage/ServerResponse to Web Standard Request/Response. v2 drops Node 18 and reworks request-body/close handling. Gladys 22 is on Node 20+, so the engine floor is fine, but this is not a patch-level bump and is untested (mocha never loads the real transport).
Keep it only together with an app-level MCP reconnect fix and a real-SDK test; otherwise leave it on 1.x with the SDK pin.
| "version": "3.5.0", | ||
| "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", | ||
| "integrity": "sha512-RaVTblr+OnEli0r/ud8InrU7D+G0y6aJhlxaLa6Pwty4+xoxboF1BsUI45tujvRpbj9dQVoglChqonGAsjEBYg==", | ||
| "version": "3.5.1", |
There was a problem hiding this comment.
bonjour 3.5.0 → 3.5.1 looks like a patch, but it pulls stealth majors on the live discovery path (google_cast.scan.js → this.bonjourLib.find({ type: 'googlecast' })):
multicast-dns6.2.3 → 7.2.5dns-packet1.3.4 → 5.6.1 (andipreplaced by@leichtgewicht/ip-codec)
Service tests mock bonjour, so they cannot validate mDNS packet parsing. Mitigating: server/services/airplay on master already ships this same chain, so this is closer to parity than #2819 was — still worth a LAN smoke against a real Cast device before calling it non-breaking.
Unrelated plus in this lockfile: protobufjs 6.11.4 → 6.11.6 backports GHSA-xq3m-2v4x-88gg. The PR body still lists a castv2-client major for that RCE; worth re-running npm audit on this package after the bump.


Summary
Automated dependency security audit of every
package.jsonin this monorepo (npm audit, high/critical severity only, devDependencies ignored unless critical). Only non-breaking (patch/minor) bumps were applied — no application code was changed, and no major version bumps were made.server,front, and all 37server/services/*packages.npm audit fix(never--force); each affected package.json'srangealready permitted the new versions, so only the twopackage-lock.jsonfiles changed.Fixed
@hono/node-server(services/mcp)@modelcontextprotocol/sdk(services/mcp)fast-uri(services/mcp)hono(services/mcp)path-to-regexp(services/mcp)ip→@leichtgewicht/ip-codec(services/google-cast)dns-packet(services/google-cast)<=5.2.4(high)multicast-dns(services/google-cast)6.0.0 - 7.2.2(high)bonjour(services/google-cast)3.3.1 - 3.5.0(high)Result:
services/mcp— 8 advisories → 0.services/google-cast— 8 advisories → 3 (see below).Tests run for the two changed packages (services have no scripts of their own, so validated via the
serverworkspace that loads and tests them):cd server && npx eslint services/mcp services/google-cast→ clean.cd server && npm run eslint(full repo) → 0 errors, 29 pre-existing warnings unrelated to this change.cd server && npm run test-service --service=mcp→ 150 passing, 0 failing.cd server && npm run test-service --service=google-cast→ 9 passing, 0 failing.To arbitrate (major bump required)
These advisories have a fix, but only via a major version bump of a direct dependency, which risks breaking changes. Left for a human decision.
jsonwebtoken(server)algorithms/key-type validation; tokens signed/verified without an explicitalgorithmsoption may start failingsqlite3(server)tar([GHSA-34x7-hfp2-rc4v], critical, hardlink path traversal),node-gyp,cacache,make-fetch-happen,@mapbox/node-pre-gypbcrypt(server)@mapbox/node-pre-gyp/tarchain as sqlite3dockerode(server)tar-fs([GHSA-vj76-c3g6-qr5v], high, symlink validation bypass)sharp(server)castv2-client(services/google-cast)castv2/protobufjs([GHSA-xq3m-2v4x-88gg], critical, protobufjs RCE)axios(services/example, services/openweather)node-hue-api(services/philips-hue)nuki-web-api(services/nuki)form-data([GHSA-fjxv-7rqg-78g4], critical) andrequest([GHSA-p8p7-x288-28g6], critical, SSRF)node-telegram-bot-api(services/telegram)form-data(critical) andrequest/@cypress/request(critical, SSRF)npm audit fixitself reports this as breaking@abandonware/noble/@abandonware/bluetooth-hci-socket(services/bluetooth)tar/node-gyp/@mapbox/node-pre-gypchain (criticaltaradvisory)No fix available upstream
axios(server, front, services/tuya) via@gladysassistant/gladys-gateway-js@gladysassistant/gladys-gateway-jsbundles its own axios; no upstream release fixes this yet@tuya/tuya-connector-nodejs(services/tuya)xmldom(services/caldav)is-url-superb/npm-name/url-regex(services/broadlink)got, unmaintainedNot touched
rootproject has no vulnerable production dependencies (its devDependencies-only advisories were non-critical, so out of scope per policy). All other audited packages either had zero high/critical findings or fall into the two sections above.Generated by Claude Code