Security Advisory

CVE-2023-0809: Mosquitto Pre-CONNECT Memory Use

Last updated:
  • CVE-2023-0809

CVE-2023-0809 lets an unauthenticated client make the Eclipse Mosquitto MQTT broker before 2.0.16 allocate excessive memory by opening a connection with a large packet that is not CONNECT. NVD scores it 5.3 and the Eclipse Foundation 5.8. Mosquitto 2.0.16 fixes it by enforcing the CONNECT-first rule on new connections.

Vulnerability summary

CVSS base score

5.3

Medium severity

EPSS score (FIRST)

0.7%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2023-0809 · Source: NVD

Affected components

ComponentCPEVersion range
Eclipse Mosquitto brokercpe:2.3:a:eclipse:mosquitto:*:*:*:*:*:*:*:*All versions before 2.0.16 (NVD); 1.5.0 to 2.0.15 (Mosquitto security page); fixed in 2.0.16
Debian mosquitto packagepkg:deb/debian/mosquittoFixed in 2.0.11-1+deb11u1 (bullseye) and 2.0.11-1.2+deb12u1 (bookworm) via DSA-5511-1; unstable fixed in 2.0.17-1; buster not affected (Debian security tracker, as of 2026-11-20)
OpenWrt packages feed: mosquitto—openwrt-21.02 branch carries 2.0.15 (affected); bumped to 2.0.17 on 2023-08-23; openwrt-22.03 and openwrt-23.05 carry 2.0.18, openwrt-24.10 carries 2.0.23 (as of 2026-11-20)
Buildroot package/mosquitto—2.0.15 up to 2023.02.4 and 2023.05.2 (affected); 2.0.17 from 2023.02.5, 2023.05.3 and 2023.08
Yocto Project meta-openembedded mosquitto recipe—dunfell builds 1.6.10 with no patch (affected); kirkstone and scarthgap build 2.0.22 (as of 2026-11-20)

What does this mean for affected devices?

Eclipse Mosquitto's 2.0.16 release notes of 2023-08-16 list the fix: "Fix excessive memory being allocated based on malicious initial packets that are not CONNECT packets." The project's security page gives the range as versions 1.5.0 to 2.0.15, fixed in 2.0.16. The Eclipse Foundation, the CNA, published the record on 2023-10-02 with "Mosquitto before 2.0.16" as the affected range (NVD, CVE record).

What does the fix change?

MQTT requires a client's first packet to be CONNECT, and Mosquitto has a check for that in the packet reader of its shared library (packet__read()). Before the fix, the check only fired for connections already in the connected state. The fix commit a3c680f by Roger Light ("Fix for Eclipse #581199", part of the v2.0.16 tag) changes the condition to state == mosq_cs_new, so a new connection whose first packet is not CONNECT is dropped before the broker reads and buffers its body. The commit's regression test opens one connection for every other packet type, each declaring a body of roughly 240 MB, and fails if the broker's memory passes 25 MB.

How severe is CVE-2023-0809?

NVD's Primary score is CVSS v3.1 5.3, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, with CWE-770 (allocation of resources without limits or throttling). The Eclipse Foundation scores it 5.8, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L, and names CWE-789 (memory allocation with excessive size value). No authentication is needed: the packet is sent before any CONNECT. On an IIoT gateway or a Sparkplug B host, memory pressure on the broker affects every device that publishes through it.

Which firmware and devices carry it?

NVD's CPE configuration covers Eclipse Mosquitto up to, but excluding, 2.0.16. Note that Mosquitto lists 1.5.0 as the first affected version, while Debian marks its buster package not affected. No vendor PSIRT, CERT@VDE or CISA ICS advisory naming a device product for this CVE was found as of 2026-11-20, so identify exposure from the firmware's component list or SBOM.

Embedded Linux images usually take the broker from a distribution or build system, so check the package version and its patches:

  • Debian fixed it in 2.0.11-1+deb11u1 (bullseye) and 2.0.11-1.2+deb12u1 (bookworm) with DSA-5511-1 of 2023-10-01, which also covers CVE-2023-28366 and the sibling CVE from the same release; unstable got 2.0.17-1. Buster is marked not affected because "the vulnerable code was introduced later" (Debian security tracker).
  • OpenWrt: the packages feed bumped mosquitto to 2.0.17 on 2023-08-23, and as of 2026-11-20 the openwrt-22.03 and openwrt-23.05 branches carry 2.0.18 and openwrt-24.10 carries 2.0.23. The openwrt-21.02 branch still carries 2.0.15 with no patches, so routers and gateways built from it are affected.
  • Buildroot made a security bump to 2.0.16 on 2023-08-20. Release 2023.08 ships 2.0.17, the 2023.02.x branch moved to 2.0.17 in 2023.02.5 and the 2023.05.x branch in 2023.05.3; 2023.02.4, 2023.05.2 and earlier ship 2.0.15.
  • Yocto Project: the meta-openembedded dunfell branch builds Mosquitto 1.6.10 with no patch for this CVE as of 2026-11-20, while kirkstone and scarthgap build 2.0.22.
  • Gentoo GLSA 202401-09 asks users to move to 2.0.17 or later.

How do you fix CVE-2023-0809?

Update the broker to Mosquitto 2.0.16 or later (2.0.17 fixes regressions in 2.0.16), or to a patched distribution package. Later releases also fix CVE-2024-8376 and CVE-2024-3935. The same 2.0.16 release fixed CVE-2023-28366 and CVE-2023-3592. Until a gateway can be updated, keep the listener off untrusted networks and limit which hosts can open TCP connections to it. Our Sparkplug B security guide lists this CVE among the broker flaws that matter when Mosquitto is the Sparkplug hub, and the MQTT protocol security guide covers listener hardening.

Is CVE-2023-0809 exploited?

It is not in the CISA KEV catalog as of 2026-11-20 (catalog version 2026.11.18, 1,786 entries). CISA's SSVC entry on the CVE record (2024-09-20) records exploitation as "none", automatable as "yes" and technical impact as "partial". FIRST EPSS gives it 0.00709, the 54.3rd percentile, in the 2026-11-19 dataset (CISA KEV, FIRST EPSS).

How to fix this class of issueThis advisory's weakness class is Resource exhaustion. Our practical guide covers how to detect, fix, verify and disclose it: How to fix SQL injection, XSS, resource exhaustion and deserialization flaws in embedded firmware.

Evidence

  • NVD (read 2026-11-20): status Modified; published 2023-10-02; NVD Primary CVSS v3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, CWE-770; Eclipse Foundation ([email protected]) Secondary 5.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L, CWE-789; CPE eclipse:mosquitto versions before 2.0.16; references the 2.0.16 release post and GLSA 202401-09. — NVD
  • Eclipse Mosquitto 2.0.16 release post (2023-08-16) and security page (read 2026-11-20): 'Fix excessive memory being allocated based on malicious initial packets that are not CONNECT packets'; security page: affecting 1.5.0 to 2.0.15, fixed in 2.0.16. — Eclipse Mosquitto
  • Commit a3c680f (Roger A. Light, authored 2023-06-09, 'Fix for Eclipse #581199', contained in tag v2.0.16), read 2026-11-20: in packet__read(), the packet reader of the shared library, the 'Clients must send CONNECT as their first command' check changes from state == mosq_cs_connected to state == mosq_cs_new; adds a broker regression test for bad initial packets, which sends each non-CONNECT packet type with a remaining length of about 243 MB and fails above 25,000,000 bytes of broker memory. — Mosquitto repository
  • Debian security tracker and DSA-5511-1 (2023-10-01), read 2026-11-20: bullseye fixed in 2.0.11-1+deb11u1, bookworm in 2.0.11-1.2+deb12u1, unstable in 2.0.17-1; buster not-affected ('The vulnerable code was introduced later'). — Debian
  • OpenWrt packages (read 2026-11-20): commit dfbf87aa17 'net/mosquitto: bump to 2.0.17' committed 2023-08-23 lists CVE-2023-28366, CVE-2023-0809 and CVE-2023-3592; net/mosquitto PKG_VERSION 2.0.15 on openwrt-21.02, 2.0.18 on openwrt-22.03 and openwrt-23.05, 2.0.23 on openwrt-24.10. — OpenWrt packages
  • Buildroot (read 2026-11-20): commit 9f1ca943d5 'package/mosquitto: security bump to version 2.0.16' (2023-08-20) lists both CVEs; MOSQUITTO_VERSION 2.0.15 in tags 2023.02.4 and 2023.05.2, 2.0.17 in 2023.02.5, 2023.05.3 and 2023.08. — Buildroot
  • meta-openembedded (read 2026-11-20): dunfell mosquitto_1.6.10.bb with patches 1571.patch and install-protocol.patch only; kirkstone and scarthgap mosquitto_2.0.22.bb. Gentoo GLSA 202401-09: affected < 2.0.17, upgrade to >= 2.0.17. — Yocto Project / Gentoo
  • CVE record (read 2026-11-20): state PUBLISHED, CNA Eclipse Foundation (eclipse), published 2023-10-02; affected Mosquitto versions less than 2.0.16; CNA CVSS v3.1 5.8 AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L; CWE-789; CISA-ADP SSVC (2024-09-20): Exploitation none, Automatable yes, Technical Impact partial. — CVE.org
  • Not in the CISA KEV catalog, version 2026.11.18 (1,786 entries), read 2026-11-20. — CISA KEV
  • EPSS 0.00709, percentile 0.54257, dataset 2026-11-19, read 2026-11-20. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. Eclipse Mosquitto: Version 2.0.16 released (2023-08-16)
  3. Eclipse Mosquitto security page: past vulnerabilities
  4. Mosquitto fix commit a3c680f: enforce CONNECT as the first packet
  5. Debian security tracker: CVE-2023-0809
  6. Debian Security Advisory DSA-5511-1: mosquitto
  7. OpenWrt packages commit dfbf87aa17: net/mosquitto: bump to 2.0.17
  8. OpenWrt packages: net/mosquitto Makefile (openwrt-21.02)
  9. Buildroot commit 9f1ca943d5: package/mosquitto: security bump to version 2.0.16
  10. meta-openembedded (dunfell): mosquitto recipe
  11. Gentoo GLSA 202401-09: Eclipse Mosquitto
  12. CVE.org record CVE-2023-0809 (CNA: Eclipse Foundation)
  13. CISA KEV
  14. FIRST EPSS

Frequently asked questions

Which Mosquitto version fixes CVE-2023-0809?

Mosquitto 2.0.16, released on 2023-08-16; 2.0.17 followed to fix regressions in 2.0.16. Debian backported the fix to bullseye (2.0.11-1+deb11u1) and bookworm (2.0.11-1.2+deb12u1) through DSA-5511-1.

Do authentication and ACLs on the broker prevent CVE-2023-0809?

No. The packet arrives before CONNECT, so the broker has not checked any username, password or client certificate yet. Limiting which hosts can reach the listener at the network level does reduce exposure.

Why do NVD and the Eclipse Foundation score it differently?

Both rate availability impact low and need no privileges. NVD keeps scope unchanged (5.3, CWE-770); the Eclipse Foundation marks scope changed (5.8) and names CWE-789.

Is an OpenWrt, Buildroot or Yocto gateway image affected?

It depends on the branch. As of 2026-11-20 OpenWrt's openwrt-21.02 feed still carries 2.0.15, while 22.03, 23.05 and 24.10 carry fixed versions. Buildroot is fixed from 2023.02.5, 2023.05.3 and 2023.08. The Yocto meta-openembedded dunfell recipe builds 1.6.10 with no patch.