Skip to main content

Cocoamqtt CVE-2026-30867

| EUVDEUVD-2026-18235 MEDIUM
Reachable Assertion (CWE-617)
2026-04-02 security-advisories@github.com GHSA-r3fr-7m74-q7g2
6.5
CVSS 3.1 · NVD
View

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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

CocoaMQTT < 2.2.2

Affected Packages

euvd cocoamqtt fix: 2.2.2

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

NVD PRIMARY 6.5 MEDIUM
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

3
CVSS changed
Oct 26, 2026 - 22:24 NVD
5.7 (MEDIUM) 6.5 (MEDIUM)
Patch available
Apr 16, 2026 - 05:29 EUVD
2.2.2
CVE Published
Apr 02, 2026 - 14:16 nvd
MEDIUM 5.7

DescriptionNVD

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

EPSS Score
0.0%
Top 87% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy