Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-30867: CWE-617: Reachable Assertion in emqx CocoaMQTT

0
Medium
VulnerabilityCVE-2026-30867cvecve-2026-30867cwe-617
Published: Thu Apr 02 2026 (04/02/2026, 13:57:06 UTC)
Source: CVE Database V5
Vendor/Project: emqx
Product: CocoaMQTT

Description

CocoaMQTT is a MQTT 5.0 client library for iOS and macOS written in Swift. Prior to version 2.2.2, a vulnerability exists in the packet parsing logic of CocoaMQTT that allows an attacker (or a compromised/malicious MQTT broker) to remotely crash the host iOS/macOS/tvOS application. If an attacker publishes the 4-byte malformed payload to a shared topic with the RETAIN flag set to true, the MQTT broker will persist the payload. Any time a vulnerable client connects and subscribes to that topic, the broker will automatically push the malformed packet. The app will instantly crash in the background before the user can even interact with it. This effectively "bricks" the mobile application (a persistent DoS) until the retained message is manually wiped from the broker database. This issue has been patched in version 2.2.2.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/02/2026, 14:41:46 UTC

Technical Analysis

CVE-2026-30867 is a reachable assertion vulnerability (CWE-617) found in the CocoaMQTT client library, an MQTT 5.0 client implemented in Swift for Apple platforms including iOS, macOS, and tvOS. The vulnerability exists in the packet parsing logic prior to version 2.2.2. Specifically, if an attacker or a compromised MQTT broker publishes a malformed 4-byte payload with the MQTT RETAIN flag set to true to a shared topic, the broker stores this payload persistently. When a vulnerable client connects and subscribes to this topic, the broker automatically delivers the malformed retained message. Upon receipt, the CocoaMQTT client attempts to parse the malformed packet but triggers an assertion failure, causing the client application to crash immediately, even if running in the background. This crash is persistent because the retained message remains on the broker until manually deleted, effectively causing a persistent denial-of-service (DoS) condition that 'bricks' the app. The vulnerability requires network-level access to publish to the MQTT broker or control of the broker itself. No user interaction beyond subscribing to the topic is needed, and no authentication bypass is indicated. The CVSS v3.1 score is 5.7 (medium), reflecting network attack vector, low attack complexity, required privileges, user interaction, and high impact on availability but no impact on confidentiality or integrity. No known exploits are reported in the wild. The issue was publicly disclosed in April 2026 and patched in CocoaMQTT version 2.2.2.

Potential Impact

The primary impact of CVE-2026-30867 is a persistent denial-of-service condition on client applications using vulnerable versions of CocoaMQTT. A malicious actor or compromised MQTT broker can publish a malformed retained message that causes all subscribing clients to crash immediately upon receiving the message. This can disrupt critical IoT, mobile, or desktop applications relying on MQTT messaging for real-time data or control, leading to service outages and degraded user experience. Since the retained message persists on the broker, the DoS effect continues until manual intervention removes the message, complicating recovery. Although confidentiality and integrity are not affected, the availability impact can be significant, especially in environments where MQTT is used for operational technology, smart home devices, or industrial control systems. Organizations relying on CocoaMQTT in their Apple platform applications may face operational disruptions, increased support costs, and potential reputational damage. The requirement for privileges to publish to the broker or control the broker limits exploitation to attackers with network access or insider capabilities, but the risk remains notable in shared or public MQTT environments.

Mitigation Recommendations

To mitigate CVE-2026-30867, organizations should immediately upgrade all CocoaMQTT client implementations to version 2.2.2 or later where the vulnerability is patched. Additionally, MQTT brokers should implement strict access controls and authentication mechanisms to prevent unauthorized publishing of retained messages, especially on shared topics. Brokers should also monitor and audit retained messages for malformed or suspicious payloads and provide automated tools or scripts to identify and remove malicious retained messages promptly. Application developers can implement additional validation and error handling around MQTT packet parsing to gracefully handle malformed messages without crashing. Network segmentation and limiting MQTT broker exposure to trusted networks reduce the attack surface. Finally, educating developers and administrators about the risks of retained messages and enforcing secure MQTT configurations will help prevent exploitation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-05T21:27:35.343Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69ce7bd9e6bfc5ba1ddfe6cc

Added to database: 4/2/2026, 2:23:21 PM

Last enriched: 4/2/2026, 2:41:46 PM

Last updated: 4/3/2026, 5:56:52 AM

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses