Engineer working on a laptop connected to a device test rig, surrounded by wiring harnesses and test hardware

Firmware vulnerabilities & fixes

MQTT security: why the spec only says 'should,' and what happens when vendors skip it

Last updated:

MQTT 5.0's own specification only recommends authentication, authorization and TLS encryption — it never requires any of them, leaving broker security entirely up to whoever deploys it. Five separate CISA ICS advisories published between January 2024 and mid-2026, against products ranging from a robotic mower to a smart-home hub to an IP-PBX, trace back to exactly that gap: hard-coded credentials, missing per-client authorization, or plain unencrypted MQTT traffic — never a break of any cryptography the protocol provides, because in each case the protocol's optional security was simply never turned on.

Key takeaways

  • MQTT 5.0's own specification only recommends authentication, authorization and TLS encryption — it never requires any of them, leaving broker security entirely up to whoever deploys it.
  • MQTT is a lightweight publish/subscribe messaging protocol maintained by the OASIS MQTT Technical Committee, currently at version 5.0 (approved as an OASIS Standard on 7 March 2019).
  • MQTT 5.0 adds hooks for stronger security, but every one of them is optional and needs support on both sides.
  • More common than the "SHOULD" language in the spec would suggest.

What is MQTT, and what does the spec actually say about security?

MQTT is a lightweight publish/subscribe messaging protocol maintained by the OASIS MQTT Technical Committee, currently at version 5.0 (approved as an OASIS Standard on 7 March 2019). The project's own description calls it "an extremely lightweight publish/subscribe messaging transport" designed for "connecting remote devices with a small code footprint and minimal network bandwidth" — which is exactly why it is the default choice for IoT device telemetry, mobile push infrastructure, and increasingly, industrial IIoT data pipelines via the Sparkplug B convention.

Section 1.6 of the MQTT 5.0 spec, titled "Security," states the only security expectation as a recommendation: "MQTT Client and Server implementations SHOULD offer Authentication, Authorization and secure communication options, such as those discussed in Chapter 5. Applications concerned with critical infrastructure, personally identifiable information, or other personal or sensitive information are strongly advised to use these security capabilities." Chapter 5 itself is titled "Security (non-normative)" and opens by saying it "is provided for guidance only." The CONNECT packet includes native Username and Password fields — the spec notes "it can be used to carry any credential information" — but neither field is encrypted or hashed by the protocol itself; confidentiality depends entirely on whether the connection also runs over TLS, which is a separate, optional layer. The earlier 3.1.1 specification is blunter about the asymmetry: "The MQTT protocol is not trust symmetrical: it provides no mechanism for the Client to authenticate the Server."

What security features did MQTT 5.0 add, and what is still missing?

MQTT 5.0 adds hooks for stronger security, but every one of them is optional and needs support on both sides. The table summarises what the 5.0 text provides:

Feature Section What it gives you What it does not do
Enhanced authentication (AUTH packet) 4.12 Challenge/response and SASL-style methods, including mutual authentication and re-authentication inside a connection Define any specific method; client and server must agree on one
Client Identifier check 5.4.2 Advice that the server checks a client is authorised to use its Client Identifier, so one client cannot take over another's session Enforce it; it is a "should" for implementers
$ topics 4.7.2 Topic filters that start with a wildcard (#, +) never match topics starting with $, such as $SYS/ Protect normal topics from wildcard subscriptions
Abnormal behaviour detection 5.4.8 A list of signals worth watching: repeated authentication attempts, topic scanning, clients that connect but send nothing Ship as a feature; it is guidance for server implementers
TLS port 4.2 Ports 8883 (TLS) and 1883 (non-TLS) are registered with IANA Prevent a listener on 1883

Section 5.4.5 adds a detail that many configurations miss: there are valid TLS cipher suites with NULL encryption, and "to ensure privacy Clients and Servers should avoid these cipher suites." Section 5.4.1 warns that passing authentication data in clear text, or requiring none, "can give rise to Man-in-the-Middle and replay attacks."

How common are open, unauthenticated MQTT brokers?

More common than the "SHOULD" language in the spec would suggest. The most credible dedicated study is Trend Micro's December 2018 research with EURECOM and Politecnico di Milano, which scanned the internet over roughly four months and collected around 209.9 million MQTT messages from 78,549 distinct brokers — a significant share configured with no access control. Independent academic work since then (an IS&T Electronic Imaging paper is one example) has reported over 100,000 unauthenticated MQTT devices found via Shodan, and more recent industry blog posts citing current Shodan queries report broker counts that run into the hundreds of thousands on the default unencrypted port, 1883. This guide treats the 2018 Trend Micro figures as the best-sourced anchor and flags the larger, newer numbers as directionally consistent self-reported search-engine counts rather than independently verified research — but the direction is the same across every source: a protocol where authentication is optional produces a persistent, measurable population of brokers where the option was never enabled.

What have real CISA advisories against MQTT-connected products found?

Five advisories from January 2024 through mid-2026 show where the practical risk actually lands: the implementation, every time.

Advisory Vendor / product CVE(s) What it actually found
ICSA-26-162-01 Yarbo robotic mower app/cloud CVE-2026-10557 (CVSS v3.1 9.8, scored by CISA as CNA), CVE-2026-7368 Hard-coded MQTT broker credentials identical for every user and device; no per-device authorization, so a serial number alone enables wildcard subscription to another owner's telemetry and commands
ICSA-26-013-03 YoSmart YoLink Smart Hub CVE-2025-59448/59449/59451/59452 Devices "leverage unencrypted MQTT to communicate over the internet"; broker lacks authorization, enabling cross-account device control via predictable IDs
ICSA-25-294-05 CloudEdge cameras/app CVE-2025-11757 App "does not sanitize the MQTT topic input," letting an attacker use an MQTT wildcard to receive messages meant for other users
ICSA-25-030-02 New Rock Technologies OM500/MX8G/NRP1302 CVE-2025-0680 (CVSS 9.8), CVE-2025-0681 Cloud MQTT service "supports wildcard topic subscription which could allow an attacker to obtain sensitive information from tapping the service communications"
ICSA-24-025-01 MachineSense FeverWarn CVE-2023-49115 Devices "use unauthenticated MQTT messaging to monitor devices and remote viewing of sensor data by users"

None of these is a flaw in MQTT 5.0's design — every one is a case where the optional authentication, authorization or encryption the spec recommends was never configured, or was configured with the same shared credential across an entire fleet.

What does a locked-down broker configuration look like?

Start from a broker whose defaults already refuse anonymous clients, then add TLS and per-client topic rules. Eclipse Mosquitto is a common open-source broker and a useful reference. Since version 2.0, its migration notes say a broker started without any listener configuration binds only to the loopback interface, and that "allow_anonymous now defaults to false" once a listener is configured. The mosquitto.conf reference documents the remaining settings:

  1. Expose only the TLS listenerConfigure a listener on 8883 with a certificate and key, and do not configure 1883 on any interface outside the host.
  2. Set a TLS floortls_version sets the minimum version; the documented values are TLS 1.3 and TLS 1.2.
  3. Use per-device identitiesWith require_certificate true, every client needs a valid certificate; use_identity_as_username true then uses the certificate's Common Name as the username for access control.
  4. Write pattern ACLs, not global grantsIn an ACL file, pattern lines substitute %u (username) and %c (client id), so the two rules pattern write devices/%u/telemetry and pattern read devices/%u/commands give every device its own branch and nothing else.
  5. Keep `allow_anonymous false` explicit, so a later configuration change cannot quietly turn it back on.

The same reference carries a warning worth repeating: with certificate-based identity, "any CA certificates you include in cafile or capath will be able to issue client certificates that are valid for connecting to your broker." Use a dedicated CA for device certificates, ideally tied to a factory-provisioned identity such as an IEEE 802.1AR DevID.

Do the MQTT libraries inside firmware have their own CVEs?

Yes. A secure configuration does not help if the broker or client library itself has a memory-safety bug, and both ship inside gateways and embedded Linux images. Recent records for Eclipse Mosquitto show the pattern:

CVE Affected Issue (per NVD) Fixed in
CVE-2023-28366 Broker 1.3.2 through 2.x before 2.0.16 Remotely triggerable memory leak with many QoS 2 messages using duplicate message IDs 2.0.16
CVE-2024-8376 Broker up to 2.0.18a Memory leak, crash or heap use-after-free from crafted CONNECT/SUBSCRIBE/PUBLISH sequences 2.0.19
CVE-2024-10525 libmosquitto 1.3.2 through 2.0.18 A malicious broker's SUBACK with no reason codes causes out-of-bounds access in the client 2.0.19
CVE-2024-3935 Broker 2.0.0 through 2.0.18 with a bridge using topic remapping Double free and crash from a crafted PUBLISH 2.0.19

As of 12 November 2026, none of these is in CISA's Known Exploited Vulnerabilities catalogue. CVE-2024-10525 is the reverse of the usual threat model: the device is the victim of a hostile or spoofed broker, which is one more reason to authenticate the server with TLS. Tracking these needs a list of which library version each firmware release ships, which is what a firmware SBOM records.

Worked example: how should a gateway fleet scope its topics?

Synthetic example for illustration; not a real product or customer. A maker ships 2,000 cellular gateways that report sensor data to a cloud broker and receive configuration commands. Each gateway has its own certificate with its serial number as Common Name.

Design choice Weak version Scoped version
Identity One shared username and password in firmware Per-device certificate; CN = serial, used as MQTT username
Telemetry topic fleet/telemetry shared by all devices/<serial>/telemetry, write-only for that serial
Commands Gateways subscribe to fleet/# Gateways read only devices/<serial>/commands
Back-end service Same rights as devices Separate identity with read on devices/+/telemetry and write on devices/+/commands
Transport 1883 open as fallback 8883 only, TLS 1.2 minimum, NULL ciphers excluded

With the weak version, extracting the credential from one gateway exposes all 2,000, which is the Yarbo pattern in the table above. With the scoped version, a stolen certificate exposes one device's branch, and the maker can revoke that certificate alone.

What should a device maker or integrator check first?

  1. Confirm TLS is actually enabled, not just available. MQTT's default unencrypted port (1883) and TLS port (8883) typically run side by side on the same broker; a client silently falling back to the open port is invisible without checking broker logs or a packet capture.
  2. Never hard-code or share broker credentialsThe Yarbo advisory above exists because every unit shipped with the same password — a single leaked or reverse-engineered credential compromised the entire fleet at once.
  3. Scope access-control lists (ACLs) per client, not globally. Three of the five advisories above are a direct consequence of a client — or an attacker posing as one — being able to subscribe to another user's topics via a wildcard (# or +) that was never restricted.
  4. If deploying Sparkplug B for IIoT/SCADA integration, remember it adds topic-namespace and payload conventions, not securityAny broker that meets the "Sparkplug Compliant" bar still inherits whatever authentication and TLS the underlying MQTT deployment was actually given — Sparkplug compliance and a secured broker are two separate checks. Our Sparkplug B guide covers that layer, and the CoAP guide covers the other common constrained-device protocol.
  5. Re-verify after every firmware or cloud-backend updatethat broker credentials weren't reset to a shared default and that ACL scoping survived the change.

Two SoftWSP services fit here. For shipped firmware, device firmware security extracts an SBOM (CycloneDX 1.6) from the image, lists packages such as mosquitto or libmosquitto where the image carries package metadata, and matches them against NVD, CISA KEV, FIRST EPSS and CISA ICS advisories, with watchlist alerts on a CVE id or vendor and product. For a running site, OT Snapshot works from a capture processed into Zeek connection logs: it shows which hosts connect to which on port 1883 or 8883 and in which direction, so plaintext MQTT and unexpected brokers stand out. It does not decode MQTT topics, credentials or TLS versions, so ACL and certificate checks stay with the broker configuration. An engineer reviews every finding, and the AI-assisted report cites the data each finding is based on — see OT Snapshot.

What are the common pitfalls?

  • Testing with an anonymous listener and shipping it. A debug listener on 1883 often survives into production images.
  • Trusting every certificate from a public CA. Client-certificate authentication is only as narrow as the CA list the broker trusts.
  • Wildcard rights for convenience. A back-end that needs devices/+/telemetry gets #, and so does every device using the same account.
  • Leaving Client Identifiers unchecked. Without the 5.4.2 check, a client that reuses another's identifier can take over its session.
  • Forgetting the client library. CVE-2024-10525 shows a device can be attacked by the broker it connects to.

This guide draws on the OASIS MQTT 5.0 and 3.1.1 specifications fetched directly, Eclipse Mosquitto's own documentation and release notes, NVD records for the Mosquitto CVEs, the Trend Micro/EURECOM/Politecnico di Milano 2018 internet-exposure study, five CISA ICS advisories fetched directly, and the Eclipse Sparkplug project's own published FAQ. Internet-exposure figures newer than the 2018 Trend Micro study (commonly cited in industry blog posts as hundreds of thousands to over a million exposed brokers) could not be independently verified against a primary dataset and are flagged as directionally consistent, not confirmed. This guide is general information, not a substitute for a current CISA ICS advisory search for your exact product and firmware version.

Put this guide to work

Frequently asked questions

Does the MQTT specification require authentication or encryption?

No. MQTT 5.0, the current OASIS Standard (approved 7 March 2019), devotes its Section 5 to security but frames every control as a recommendation, not a requirement: "MQTT Client and Server implementations SHOULD offer Authentication, Authorization and secure communication options... Applications concerned with critical infrastructure, personally identifiable information, or other personal or sensitive information are strongly advised to use these security capabilities." SHOULD, in the IETF/OASIS sense, means an implementer can skip it and still claim protocol compliance. The CONNECT packet carries native Username and Password fields, but the spec itself does not encrypt or hash them — confidentiality depends entirely on whether the connection also runs over TLS, which is likewise optional. MQTT's earlier 3.1.1 text is explicit that the protocol is not even trust-symmetrical: "The MQTT protocol is not trust symmetrical: it provides no mechanism for the Client to authenticate the Server." MQTT is maintained by the OASIS MQTT Technical Committee and described on the project's own site as "an extremely lightweight publish/subscribe messaging transport" built for a small code footprint — a design goal that, in practice, has repeatedly meant security was left for someone downstream to add.

How common are internet-exposed MQTT brokers with no authentication?

Documented as a real, recurring problem, though exact current counts vary by source and methodology, so treat any single round number with caution. The most-cited peer-reviewed-adjacent research is Trend Micro's December 2018 study with EURECOM and Politecnico di Milano, "The Fragility of Industrial IoT's Data Backbone," which collected roughly 209.9 million MQTT messages from 78,549 distinct brokers over about four months of internet scanning, many configured with no access control at all. Independent academic exposure counts since then (for example an IS&T Electronic Imaging paper reporting over 100,000 unauthenticated MQTT devices via Shodan) point the same direction, and more recent vendor blog posts citing Shodan queries report broker counts in the hundreds of thousands to over a million on the default port — those later figures are self-reported search-engine counts rather than peer-reviewed research, so this guide cites the 2018 Trend Micro study as its anchor and flags the newer numbers as directionally consistent but unverified. The pattern across all of them is the same: a protocol that makes authentication optional produces a long tail of brokers where the option was never turned on.

What have real CISA ICS advisories against MQTT-connected products found in 2024-2026?

A consistent pattern of implementation failures, not a break of any cryptography MQTT provides. CISA's ICSA-26-162-01 (Yarbo robotic mower app and cloud) found hard-coded MQTT broker credentials — "the Yarbo Android and iOS applications contain hard-coded MQTT broker credentials that are identical for all users and all devices" (CVE-2026-10557, CVSS v3.1 9.8) — plus missing per-device authorization letting any client subscribe to another owner's robot telemetry and commands by serial number alone (CVE-2026-7368). ICSA-26-013-03 (YoSmart YoLink smart hub) found the ecosystem's devices "leverage unencrypted MQTT to communicate over the internet" with no broker-side authorization, enabling cross-account device control via predictable identifiers (CVE-2025-59448/59449/59451/59452). ICSA-25-294-05 (CloudEdge cameras) found the app "does not sanitize the MQTT topic input, which could allow an attacker to leverage the MQTT wildcard to receive all the messages that should be delivered to other users" (CVE-2025-11757). ICSA-25-030-02 (New Rock Technologies IP-PBX and gateway products) found a cloud MQTT service that "supports wildcard topic subscription which could allow an attacker to obtain sensitive information from tapping the service communications" (CVE-2025-0681), alongside a separate critical flaw (CVE-2025-0680, CVSS v3.1 9.8) in the same product line. ICSA-24-025-01 (MachineSense FeverWarn thermal-screening devices) found the product line simply "use[s] unauthenticated MQTT messaging to monitor devices and remote viewing of sensor data by users" (CVE-2023-49115). Every one of these is an implementer choice — shared credentials, missing authorization, or unencrypted transport — not a flaw in the MQTT protocol's own design.

What should a device maker or integrator using MQTT check first?

Inventory every broker, client and topic namespace your product or deployment uses, and confirm — rather than assume — that TLS is actually enabled on the broker listener, since MQTT's default unencrypted port (1883) and its TLS port (8883) commonly run side by side and a client falling back to the open port is invisible without checking broker logs or a network capture. Never hard-code or share broker credentials across devices or customers; each of the 2024-2026 advisories above traces back to exactly this shortcut. Configure the broker's access-control list (ACL) so each client can only publish and subscribe to the topics it actually needs — wildcard subscriptions (`#` and `+`) should be scoped per client, not granted globally, since three of the five advisories above are a direct consequence of a client (or an attacker posing as one) being able to subscribe to other users' topics. If the deployment is industrial rather than consumer IoT and uses Sparkplug B for SCADA/IIoT interoperability, remember that Sparkplug adds topic-namespace and payload conventions on top of MQTT, not a separate security layer — any MQTT broker that meets the Sparkplug Compliant bar still inherits whatever authentication and TLS configuration (or lack of it) the underlying broker was given.

Sources

  1. OASIS: MQTT Version 5.0, OASIS Standard (approved 7 March 2019) — Section 5, Security
  2. OASIS: MQTT Version 3.1.1, OASIS Standard — trust-asymmetry and CONNECT packet fields
  3. Trend Micro / EURECOM / Politecnico di Milano: "The Fragility of Industrial IoT's Data Backbone" (December 2018)
  4. CISA ICS Advisory ICSA-26-162-01: Yarbo mobile app and cloud (CVE-2026-10557, CVE-2026-7368)
  5. CISA ICS Advisory ICSA-26-013-03: YoSmart YoLink Smart Hub (CVE-2025-59448, -59449, -59451, -59452)
  6. CISA ICS Advisory ICSA-25-294-05: CloudEdge cameras/app (CVE-2025-11757)
  7. CISA ICS Advisory ICSA-25-030-02: New Rock Technologies OM500/MX8G/NRP1302 (CVE-2025-0680, CVE-2025-0681)
  8. CISA ICS Advisory ICSA-24-025-01: MachineSense FeverWarn (CVE-2023-49115)
  9. Eclipse Foundation: Sparkplug specification and FAQ
  10. Eclipse Mosquitto: Migrating from 1.x to 2.0 (listener and allow_anonymous defaults)
  11. Eclipse Mosquitto: mosquitto.conf man page (TLS, require_certificate, use_identity_as_username, ACL patterns)
  12. Eclipse Mosquitto: Version 2.0.16 released (August 2023)
  13. Eclipse Mosquitto: Version 2.0.19 released (2 October 2024)
  14. NVD: CVE-2024-8376 (Eclipse Mosquitto broker)
  15. NVD: CVE-2023-28366 (Eclipse Mosquitto broker)
  16. NVD: CVE-2024-10525 (libmosquitto client)
Was this guide helpful?

In this cluster

MQTT security: why the spec only says 'should,' and what happens when vendors skip it