5.17.0 (2026-11-30)
Security
Upgrade to 5.17.0. The 4.x line (4.3.8) has both issues and is not patched.
- GHSA-vp96-jq7h-5x6g (medium). In a browser, a Web Worker, React Native or with
forceNativeWebSocket, atls://orssl://broker URL connected overws://, with no TLS. Someone on the network path could read the username, the password and every message. No authentication needed.- Behaviour change:
tls://andssl://now connect overwss://in these builds. On Node.js,wxs://andalis://connect overmqtts://. A secure protocol with no secure transport now throwsNo secure transport available for protocol "<protocol>". Protocols are lowercased, soMQTTS://works likemqtts://.
- Behaviour change:
- GHSA-c7vh-4qgc-w67h (low). After a malformed packet the client kept the connection open, and could read the bytes of a message payload as packets.
- Behaviour change: a malformed packet now closes the connection (MQTT 5 sends DISCONNECT 0x81 first) and the client reconnects. The
errorevent is anErrorWithReasonCodewithcode0x81.
- Behaviour change: a malformed packet now closes the connection (MQTT 5 sends DISCONNECT 0x81 first) and the client reconnects. The
Both reported by @mark1russell7.
Bug Fixes
- add named exports to dist/mqtt.esm.js (#2082) (0ceae41), closes #2056 #2022 #2074 #2083
- check outgoing PUBLISH against the CONNACK limits of the server (#2119) (da07af2), closes #2103 #2104 #2092 #2097 #2098
- cli: make
mqtt sub -Hshow help (#2078) (a21e75d) - close the connection when a packet fails to parse (GHSA-c7vh-4qgc-w67h) (#2127) (e1d7472)
- give an aliased inbound PUBLISH its topic name for every QoS (#2115) (1a29beb), closes #2099
- never fall back to a transport without TLS for a secure protocol (GHSA-vp96-jq7h-5x6g) (#2126) (02cd5d0)
- never give a new packet an id that is still in flight (#2118) (e1a843c), closes #2095
- per-topic suback failures and MQTT 5 unsuback reason codes (#2117) (ded7109), closes #2100 #2106
- refuse a PUBLISH with Topic Alias 0 (#2114) (5b2db92), closes #2093
- resend with DUP 1, and drop the sent messages of a lost MQTT 5 session (#2120) (635ffce), closes #2094 #1651 #2086 #2086 #2113
- scope
forceNativeWebSocketto the client that sets it (#2116) (0d31e9c), closes #2050 - send DUP 0 in a QoS 0 PUBLISH (#2113) (7d08173), closes #2096 #2109
- split url auth at the first colon so a password can contain one (#2123) (9073c63), closes #1927
- strip the trailing colon from the protocol of an options object (#2079) (d46a365)
- tls: use the servername of each host of
serversafter a failover (#2108) (fa1694c), closes #2101 #2051 #2051