Skip to main content
VulnerabilityPublished Updated

CVE-2026-30867: CocoaMQTT · Denial of Service via Reachable Assertion in `PUBLISH` Packet Parsing

Affects github.com/emqx/CocoaMQTTSource GCVE Database

0
Compare
Authoritative record:CVE-2026-30867· Medium 5.7

Not known to be exploited · CVSS 5.7 Medium : upgrade to 2.2.2 when convenient.

Data as of 4 Dec 2026, 18:54 UTC

CVSS 3.1 base score
5.7Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.2.2
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 2 Apr 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Dec 2026.

What to do

Upgrade github.com/emqx/CocoaMQTT and CocoaMQTT to 2.2.2.

Affected software

ProductAffectedFixed in
SwiftURLgithub.com/emqx/CocoaMQTTAffected
  • <2.2.2
Fixed in
  • 2.2.2
SwiftURLCocoaMQTTpkg:swift/CocoaMQTTOther threatsAffected
  • <2.2.2
Fixed in
  • 2.2.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in CocoaMQTT version 2.2.2 that fixes this issue. Users should upgrade to version 2.2.2 or later. Until patched, removing any malformed retained messages with zero-length topics from the MQTT broker will prevent the persistent denial of service. No other mitigation is specified.

Description

CocoaMQTT versions prior to 2.2.2 contain a vulnerability in the parsing of PUBLISH packets where a malformed retained message with a zero-length topic can cause the client application to crash. This crash occurs due to an out-of-bounds range error in Swift when extracting the topic string, leading to a denial of service that persists until the retained message is removed from the MQTT broker.

References

Community reviews

Loading reviews…