Skip to content

v4.2.3

Choose a tag to compare

@Nedomas Nedomas released this 23 Nov 17:12
1e07b8e

latest moves from 4.2.2 to 4.2.3: security fixes and dependency updates. Upgrading is recommended. No new options, and no defaults change.

Security fixes

  • SSE sessions. A sessionId that isn't a session this gateway created is now always an unknown session (503), whatever its value (#378)
  • --cors applies to WebSocket. With origins listed, a web page from another origin can no longer open a WebSocket (403, logged). Clients that aren't browsers send no origin and are unaffected. Bare --cors, and a gateway without --cors, accept what they always have (#378)
  • Remote servers that redirect. A redirect is still followed. The --header and --oauth2Bearer values go with it on the same origin, or from http to https on the same host; a redirect to any other origin is followed without them, and logged once
  • Several servers in one (combined). A server's capabilities are merged as plain data, whatever keys they contain

Changes

  • A warning when any web page can use a WebSocket server. A stdio→WS gateway with neither --cors nor an API key prints one WARNING: Neither --cors nor an API key is set line on stderr at startup, even with --logLevel none, and logs each web page origin that connects. It changes nothing else
  • README: a Security section on --host, --apiKey and --cors, and a safer WebSocket example
  • Dependencies. MCP SDK 1.32.2, @modelcontextprotocol/server and client 2.4.0, node 2.1.2, and fixed transitive packages. With SDK 1.32.2 a JSON-RPC batch (protocol 2025-03-26) of more than 100 messages to Streamable HTTP output is refused with 400, as on every server built on the SDK since 1.30.1; up to 100 are answered as before

Validation

New tests cover each fix end to end on every output and in config files, and each fails without its fix. Nothing else changes for clients: the side-by-side check against 4.1.0–4.2.2 and the own tests of 4.0.0–4.2.2 pass, except the 100-message batch limit above. 2.8.3, 3.4.3 and 4.0.0, as the bridge in front of 4.2.3 or the gateway behind it, work with it exactly as with 4.2.2. The suite also passes on every MCP SDK from 1.18.2 to 1.32.2, with Python, Go and Ruby clients, and in a real browser. 4.2.3-rc.1 passed a 25-hour soak on Linux, Windows and macOS.

Thanks to: