mqtt
5.16.1 · 14 Oct 2026MIT1.5M / weekRepositoryHomepagenpmAtom feed
210 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
5.16.0
16 Sep 2026- security
optionsis no longer mutated by a CONNACK. Code that read negotiated values back offoptions.properties.maximumPacketSizeoroptions.keepalivemust use the newclient.serverProperties/client.keepalivegetters instead. - security
A refused CONNACK now always closes the socket. With
reconnectOnConnackError: false(the default) the client previously sat on an open connection and kept deliveringmessageevents after telling the application the connection was refused. - security
Protocol violations now drop the connection: a SUBACK reason-code count mismatch, an invalid Topic Alias, an unsolicited or out-of-spec AUTH, and a broker exceeding
receiveMaximumon inbound QoS 2 (reason code0x93). Reconnect stays armed in all cases.
Security
This release fixes six advisories. All are reachable from a malicious or misbehaving broker — or anyone who can inject packets into a cleartext
mqtt://hop — with no special client configuration beyond speaking MQTT 5. Upgrade to 5.16.0; everything<= 5.15.2is affected, including the v4 line, and there is no backport.Advisory Severity Impact GHSA-c8jq-r765-cq7g High An unsolicited MQTT 5 Topic Alias throws an uncaught TypeErrorin the stream write path — kills the Node process, repeatable on every reconnect.GHSA-rj8f-4655-cgg2 High A SUBACK with the wrong number of reason codes crashes the process, or silently misreports which topics are subscribed. GHSA-gfxc-3w7m-8ch4 High CONNACK properties were merged into the caller's own options object. A maximumPacketSizeof 1 permanently kills the client, survives reconnects, and escapes to other clients built from the same options.GHSA-fwrw-4mhv-wxvm High A single unsolicited AUTH packet crashes the process on a default MQTT 5 client. Enhanced authentication did not have to be configured. GHSA-8phv-jwjm-93rr Medium A duplicate CONNACK re-runs connection setup mid-session: in-flight QoS 1 resent under the same ids, all topics resubscribed, message-id state reset. GHSA-h8jm-hm87-fqw3 Low The advertised receiveMaximumwas ignored for inbound QoS 2, letting a broker grow the incoming store without bound. Reconnecting does not clear it.Reproduction steps and full analysis stay in the advisories. CVE ids have been requested and will be added here once assigned.
Behaviour changes to check before upgrading
- security
optionsis no longer mutated by a CONNACK. Code that read negotiated values back offoptions.properties.maximumPacketSizeoroptions.keepalivemust use the newclient.serverProperties/client.keepalivegetters instead. - security
A refused CONNACK now always closes the socket. With
reconnectOnConnackError: false(the default) the client previously sat on an open connection and kept deliveringmessageevents after telling the application the connection was refused. - security
Protocol violations now drop the connection: a SUBACK reason-code count mismatch, an invalid Topic Alias, an unsolicited or out-of-spec AUTH, and a broker exceeding
receiveMaximumon inbound QoS 2 (reason code0x93). Reconnect stays armed in all cases. - security
An ack that does not answer the command pending on that message id is dropped and reported via
error, instead of running the wrong completion path. - security
The unregistered-alias case now emits reason code
0x82(Protocol Error) instead of0x94. - security
AUTH reason code 0 ends the exchange successfully; previously it produced an error with an empty reason string.
- security
properties.receiveMaximumoutside 1..65535, or not an integer, is ignored and 65535 is enforced and advertised instead. - security
The inbound packet-size cap now measures total wire size rather than Remaining Length, so it triggers on packets a few bytes smaller than before.
- security
New exports:
PacketPump(src/lib/shared.ts),PendingCommandfrom the entry point.
Reported
Bug Fixes
- security
bounds-check the suback granted array against subscriptions sent (GHSA-rj8f-4655-cgg2) (#2061) (46ee23f), closes #2060
- security
enforce MQTT 5 Receive Maximum for inbound QoS 2 messages (GHSA-h8jm-hm87-fqw3) (#2065) (ec5bf3e), closes #2064 #2063 #2062 #2061 #2060
- security
keep broker CONNACK properties out of the user options object (GHSA-gfxc-3w7m-8ch4) (#2062) (3db16f5), closes #2061 #2060 #2060 #2060
- security
reject a duplicate CONNACK instead of re-running connection setup (GHSA-8phv-jwjm-93rr) (#2064) (7108ea5), closes #2063 #2062 #2061 #2060
- security
reject an unsolicited AUTH instead of crashing the process (GHSA-fwrw-4mhv-wxvm) (#2063) (b511e7b), closes #2062 #2061 #2060 #2060
- security
reject unsolicited MQTT 5 topic alias instead of crashing (GHSA-c8jq-r765-cq7g)
5.15.2
6 Jul 2026Reading the note…
5.15.1
24 Mar 2026Reading the note…
5.15.0
2 Feb 2026Reading the note…
5.14.1
4 Sep 2025Reading the note…
5.14.0
30 Jul 2025Reading the note…
5.13.3
18 Jul 2025Reading the note…
5.13.2
7 Jul 2025Reading the note…
5.13.1
3 Jun 2025Reading the note…
5.13.0
9 May 2025Reading the note…
5.12.1
6 May 2025Reading the note…
5.12.0
28 Apr 2025Reading the note…
5.11.1
23 Apr 2025Reading the note…
5.11.0
10 Apr 2025Reading the note…
5.10.4
26 Feb 2025Reading the note…
5.10.3
26 Nov 2024Reading the note…
5.10.2
13 Nov 2024Reading the note…
5.10.1
28 Aug 2024Reading the note…
5.10.0
14 Aug 2024Reading the note…
5.9.1
1 Aug 2024Reading the note…
5.9.0
26 Jul 2024Reading the note…
5.8.1
18 Jul 2024Reading the note…
5.8.0
5 Jul 2024Reading the note…
5.7.3
26 Jun 2024Reading the note…
5.7.2
19 Jun 2024Reading the note…
5.7.1
18 Jun 2024Reading the note…
5.7.0
28 May 2024Reading the note…
5.6.2
23 May 2024Reading the note…
5.6.1
17 May 2024Reading the note…
5.6.0
13 May 2024Reading the note…
5.5.6
13 May 2024Reading the note…
5.5.5
30 Apr 2024Reading the note…
5.5.4
26 Apr 2024Reading the note…
5.5.3
19 Apr 2024Reading the note…
5.5.2
12 Apr 2024Reading the note…
5.5.1
10 Apr 2024Reading the note…
5.5.0
18 Mar 2024Reading the note…
5.4.0
13 Mar 2024Reading the note…
5.3.6
26 Feb 2024Reading the note…
5.3.5
23 Jan 2024Reading the note…
5.3.4
22 Dec 2023Reading the note…
5.3.3
5 Dec 2023Reading the note…
5.3.2
4 Dec 2023Reading the note…
5.3.1
28 Nov 2023Reading the note…
5.3.0
18 Nov 2023Reading the note…
5.2.2
14 Nov 2023Reading the note…
5.2.1
10 Nov 2023Reading the note…
5.2.0
9 Nov 2023Reading the note…
5.1.4
30 Oct 2023Reading the note…