CVE-2026-30867: CocoaMQTT · Denial of Service via Reachable Assertion in `PUBLISH` Packet Parsing
Affects github.com/emqx/CocoaMQTTSource GCVE Database
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
- 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:HExploitation evidence
Disclosed: evidence found.
CVE published 2 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
| SwiftURLgithub.com/emqx/CocoaMQTT | Affected
| Fixed in
|
SwiftURLCocoaMQTTpkg:swift/CocoaMQTTOther threats | Affected
| Fixed in
|
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
- github.com/emqx/CocoaMQTT/security/advisories/GHSA-r3fr-7m74-q7g2 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-30867 (opens in a new tab)
- github.com/emqx/CocoaMQTT/pull/659 (opens in a new tab)
- github.com/emqx/CocoaMQTT/commit/010bca6f61b97d726252f61641d331a2bf82b338 (opens in a new tab)
- github.com/emqx/CocoaMQTT (opens in a new tab)
- github.com/emqx/CocoaMQTT/releases/tag/2.2.2 (opens in a new tab)