Skip to content

chore(security): bump transitive deps to clear high/critical npm advisories - #2949

Open
Pierre-Gilles wants to merge 1 commit into
masterfrom
chore/security-audit-2026-08-18
Open

chore(security): bump transitive deps to clear high/critical npm advisories#2949
Pierre-Gilles wants to merge 1 commit into
masterfrom
chore/security-audit-2026-08-18

Conversation

@Pierre-Gilles

Copy link
Copy Markdown
Contributor

Summary

Automated dependency security audit of every package.json in 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.

  • ~48 npm projects audited: root, server, front, and all 37 server/services/* packages.
  • Bumps were applied via npm audit fix (never --force); each affected package.json's range already permitted the new versions, so only the two package-lock.json files changed.
  • No package.json semver ranges were modified.

Fixed

Package (in) Before → After Advisory
@hono/node-server (services/mcp) 1.19.9 → 2.1.1 GHSA-wc8c-qw6v-h7f6 (high) + GHSA-92pp-h63x-v22m, GHSA-frvp-7c67-39w9
@modelcontextprotocol/sdk (services/mcp) 1.25.3 → 1.30.0 GHSA-345p-7cg4-v4c7 (high)
fast-uri (services/mcp) 3.1.0 → 3.1.5 GHSA-v2hh-gcrm-f6hx (high) + 4 related host-confusion advisories
hono (services/mcp) 4.11.5 → 4.13.2 GHSA-9r54-q6cx-xmh5 (high, XSS) + ~40 other advisories fixed by this range
path-to-regexp (services/mcp) 8.3.0 → 8.4.2 GHSA-j3q9-mxjg-w52f (high, ReDoS)
ip@leichtgewicht/ip-codec (services/google-cast) removed / 2.0.5 added GHSA-2p57-rm9w-gvfp (high, SSRF)
dns-packet (services/google-cast) 1.3.4 → 5.6.1 advisory affecting <=5.2.4 (high)
multicast-dns (services/google-cast) 6.2.3 → 7.2.5 advisory affecting 6.0.0 - 7.2.2 (high)
bonjour (services/google-cast) 3.5.0 → 3.5.1 advisory affecting 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 server workspace 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=mcp150 passing, 0 failing.
  • cd server && npm run test-service --service=google-cast9 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.

Package Target Nature of the flaw Likely breakage
jsonwebtoken (server) → 9.0.3 GHSA-8cf7-32gw-wr33 (high) — unrestricted key type usage v9 tightens algorithms/key-type validation; tokens signed/verified without an explicit algorithms option may start failing
sqlite3 (server) → 6.0.1 Pulls in vulnerable tar ([GHSA-34x7-hfp2-rc4v], critical, hardlink path traversal), node-gyp, cacache, make-fetch-happen, @mapbox/node-pre-gyp v6 is a rewrite on prebuild-install/N-API; native binding rebuild required, Node engine constraints may shift
bcrypt (server) → 6.0.0 Same @mapbox/node-pre-gyp/tar chain as sqlite3 Native module rebuild; possible prebuilt-binary compatibility changes
dockerode (server) → 5.0.1 Pulls in vulnerable tar-fs ([GHSA-vj76-c3g6-qr5v], high, symlink validation bypass) Dockerode v5 API changes
sharp (server) → 0.35.3 Bundled libvips CVEs (CVE-2026-33327/33328/35590/35591) libvips ABI bump, native rebuild
castv2-client (services/google-cast) → 0.0.2 Pulls in vulnerable castv2/protobufjs ([GHSA-xq3m-2v4x-88gg], critical, protobufjs RCE) Note: target version number is lower than current due to this package's pre-1.0 semver history — needs manual verification before adopting
axios (services/example, services/openweather) → 1.19.0 GHSA-wf5p-g6vw-rhxx (high, CSRF) axios 0.x → 1.x is a breaking major (Promise/interceptor/error-shape changes)
node-hue-api (services/philips-hue) → 5.0.0-beta.16 Bundled axios CSRF advisory Target is a beta release; v2→v5 is a large API surface change
nuki-web-api (services/nuki) → 2.1.0 Pulls in vulnerable form-data ([GHSA-fjxv-7rqg-78g4], critical) and request ([GHSA-p8p7-x288-28g6], critical, SSRF) Major bump of the Nuki API client
node-telegram-bot-api (services/telegram) → 2.0.0 Pulls in vulnerable form-data (critical) and request/@cypress/request (critical, SSRF) Major bump; npm audit fix itself reports this as breaking
@abandonware/noble / @abandonware/bluetooth-hci-socket (services/bluetooth) major (no specific safe target identified by npm) Same tar/node-gyp/@mapbox/node-pre-gyp chain (critical tar advisory) Unmaintained abandonware fork; no clear upgrade path found automatically

No fix available upstream

Package Advisory Dependency path
axios (server, front, services/tuya) via @gladysassistant/gladys-gateway-js GHSA-wf5p-g6vw-rhxx (high, CSRF) @gladysassistant/gladys-gateway-js bundles its own axios; no upstream release fixes this yet
@tuya/tuya-connector-nodejs (services/tuya) same axios advisory, bundled direct dependency, no newer release available
xmldom (services/caldav) GHSA-h6q6-9hqw-rwfv (critical, XML misinterpretation) direct dependency; package has no non-vulnerable release
is-url-superb / npm-name / url-regex (services/broadlink) ReDoS ([GHSA-v4rh-8p82-6h5w] and related) transitive via got, unmaintained

Not touched

root project 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

…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.
@Pierre-Gilles Pierre-Gilles added the dependencies Dependency updates (Dependabot/Renovate) label Aug 18, 2026 — with Claude
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • server/services/google-cast/package-lock.json is excluded by !**/package-lock.json
  • server/services/mcp/package-lock.json is excluded by !**/package-lock.json

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 645f85a7-fa2a-48f0-97b5-aef96cc9d26a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added area:integration Services and integrations (server/services/**) type:chore Deps, CI, refactoring, docs. Hidden from user changelog labels Aug 18, 2026
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (48bfc6d) to head (b05796f).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying gladys-plus with  Cloudflare Pages  Cloudflare Pages

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

View logs

@github-actions

Copy link
Copy Markdown
Contributor

🐳 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:

ghcr.io/gladysassistant/gladys-preview:chore-security-audit-2026-08-18

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-18

This 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 /build-arm64 on this pull request.

@Pierre-Gilles Pierre-Gilles added needs:human-review Automated review is not confident, maintainer must take a look risk:high Touches DB migrations, auth, billing or user data. Careful human review required labels Aug 18, 2026 — with Cursor
@cursor
cursor Bot requested a review from atrovato August 18, 2026 05:25

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 McpServer in createServer and, on every HTTP / Gladys Plus mcp-webhook hit, does new 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 before res.on('close')transport.close() clears _transport) become hard 500s.
  • The advisory’s workaround is a fresh McpServer per request/session, plus a real-SDK test. Mocha still stubs StreamableHTTPServerTransport, so “150 passing” does not exercise 1.30.0 or @hono/node-server.
  • @hono/node-server 1 → 2 is on the live path: streamableHttp.js still calls getRequestListener for Node↔Web Standard conversion (engines ≥20 is fine on Gladys Node 22).

Please either:

  1. Revert server/services/mcp/package-lock.json until application code creates a fresh McpServer (or fully close()s before reconnect) with an integration test that hits the real SDK; or
  2. 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 mocks bonjour, so LAN mDNS is untested.
  • Mitigating: server/services/airplay on master already resolves bonjour@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: protobufjs 6.11.4 → 6.11.6 backports GHSA-xq3m-2v4x-88gg (CVE-2026-41242). The arbitration table still lists a castv2-client major 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.js device-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.

Open in Web View Automation 

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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bonjour 3.5.0 → 3.5.1 looks like a patch, but it pulls stealth majors on the live discovery path (google_cast.scan.jsthis.bonjourLib.find({ type: 'googlecast' })):

  • multicast-dns 6.2.3 → 7.2.5
  • dns-packet 1.3.4 → 5.6.1 (and ip replaced 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:integration Services and integrations (server/services/**) dependencies Dependency updates (Dependabot/Renovate) needs:human-review Automated review is not confident, maintainer must take a look risk:high Touches DB migrations, auth, billing or user data. Careful human review required type:chore Deps, CI, refactoring, docs. Hidden from user changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants