Impact
CocoaMQTT contains a flaw in its packet parsing logic that triggers a reachable assertion when a 4‑byte malformed payload is received on a topic marked with the RETAIN flag. The assertion causes the client application to crash in the background, resulting in a persistent denial of service that prevents the user from interacting with the app until the malformed message is removed from the broker. This weakness is classified as CWE‑617, an Improper Handling of Assertion issue.
Affected Systems
The vulnerability affects the CocoaMQTT Swift MQTT client library used in iOS, macOS, and tvOS applications. Versions prior to 2.2.2 are susceptible; the fix was introduced in release 2.2.2 and subsequent versions.
Risk and Exploitability
The CVSS score of 5.7 indicates a medium impact, and the EPSS score of less than 1% suggests a low probability of exploitation. It is not listed in the CISA KEV catalog. Attacks require an attacker who controls or compromises a MQTT broker to publish a malformed retained packet; any vulnerable client that subscribes to that topic will instantly crash, making the exploitation path remote and straightforward for a broker operator.
OpenCVE Enrichment
Github GHSA