Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V16 - Security Logging and Error Handling Reachable assertion handling
|
| Impact | CVSS 5.7 (Medium-High) reflects network-based attack vector with low complexity and high availability impact, though CVSS penalizes risk by requiring PR:L (authenticated/user interaction). EPSS data not provided, limiting exploitation probability analysis. No KEV (CISA Known Exploited Vulnerabilities) status provided, so active real-world exploitation is unconfirmed. Publicly available proof-of-concept code and patches exist (GitHub PR #659, commit 010bca6f, release 2.2.2), lowering technical barrier to testing. Real-world risk is moderate: attackers must either compromise an MQTT broker or have publish rights to shared topics, and the impact is denial of service rather than data breach or code execution. However, the persistent nature (broker-retained payload) and automatic trigger (all vulnerable subscribers) elevate practical risk for mobile applications in enterprise MQTT deployments. Organizations using CocoaMQTT should prioritize patching due to ease of exploitation post-compromise and lack of user-visible warning before crash. |
| Exploit ScenarioDerived | An attacker or insider with publish rights to an MQTT broker crafts a 4-byte malformed packet and publishes it to a shared topic with the RETAIN flag enabled. The broker persists this payload. When a mobile application using vulnerable CocoaMQTT (version <2.2.2) connects and subscribes to that topic, the broker automatically delivers the retained malformed packet. The application's packet parsing code encounters an unhandled assertion or exception and crashes immediately, removing the application from memory without user interaction (UI:R satisfied via silent background processing). Users attempting to use the application find it non-functional; the attack persists until a broker administrator manually deletes the retained message. Publicly available patch code (GitHub PR #659) exists, reducing attack complexity for motivated attackers. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 02, 2026
CocoaMQTT library versions prior to 2.2.2 allow remote denial of service when parsing malformed MQTT packets from a broker, causing immediate application crashes on iOS, macOS, and tvOS devices. An attacker or compromised MQTT broker can publish a 4-byte malformed payload with the RETAIN flag to persist it indefinitely, ensuring every vulnerable client that subscribes receives the crash-inducing packet, effectively bricking the application until manual intervention on the broker. The vulnerability requires an authenticated user context (PR:L in CVSS vector) but impacts application availability with high severity; patch version 2.2.2 is available.
RemediationAI
Upgrade CocoaMQTT to version 2.2.2 or later, which patches the packet parsing vulnerability. Users managing Swift projects should update their package dependencies via Swift Package Manager by specifying version 2.2.2 or higher in Package.swift or Xcode project settings. The fix is available in the official release at https://github.com/emqx/CocoaMQTT/releases/tag/2.2.2. For applications already deployed, coordinate a software update to affected iOS/macOS/tvOS clients. Brokers should also review retention policies and access controls to prevent unauthorized message publication. No workarounds are available short of removing the library or disabling MQTT subscriptions.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CocoaMQTT is a Swift-based MQTT 5.0 protocol client library for Apple platforms. The vulnerability resides in packet parsing logic (CWE-617: Reachable Assertion) that fails to validate malformed packet structures before processing them. MQTT brokers with message retention enabled (RETAIN flag) can persist specially crafted 4-byte payloads that trigger an assertion failure or unhandled exception during packet deserialization. When a client connects and subscribes to a topic containing such a retained message, the broker automatically pushes the malformed packet to the client, where the parsing code crashes before any application-level handling occurs. This is a state-persistence attack vector unique to MQTT's retention feature, allowing one-time malicious publication to affect all future subscribers.
Know when Cocoamqtt gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-18235
GHSA-r3fr-7m74-q7g2
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB