Skip to main content

MQTT-C EUVDEUVD-2026-36663

| CVE-2026-54412 HIGH
Out-of-bounds Read (CWE-125)
2026-06-14 TuranSec GHSA-28cw-rpqc-wqqj
7.8
CVSS 4.0 · Vendor: TuranSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Operate or compromise target MQTT broker (or achieve MitM position)
  2. Delivery
    Victim MQTT-C client connects and subscribes to topic
  3. Exploit
    Send single crafted PUBLISH packet (topic_name_size=0xFFFF, remaining_length=7)
  4. Execution
    Parser advances 65535 bytes past receive buffer into adjacent heap memory
  5. Persist
    Unsigned underflow produces application_message_size ≈ 2^32
  6. Impact
    memmove() with ~2^32 size crashes client process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The victim application must be built against MQTT-C version 1.1.6 or earlier and must be operating as a subscribing MQTT client - specifically, it must have called mqtt_subscribe() and be processing incoming PUBLISH packets from a broker. The attacker must satisfy one of two network-position prerequisites before sending the crafted packet: (1) Control of the MQTT broker the victim client is connected to, including operating a malicious broker that the victim connects to voluntarily (e.g., a rogue public broker) or having compromised a legitimate broker; or (2) The ability to inject arbitrary TCP payload bytes into the plaintext MQTT session between the victim client and its broker, requiring a man-in-the-middle network position such as ARP poisoning on the same Layer 2 segment. Exploitation is blocked when the MQTT session uses TLS - TLS prevents traffic injection and authenticates the server, defeating both attack paths simultaneously. No QoS level restriction applies: the underflow is reachable at QoS 0 (subtracts 2) and at QoS greater than 0 (subtracts 4); only the constant differs. No authentication on the victim's operating system is required of the attacker. Clients connecting exclusively to TLS-secured, certificate-verified, known-good brokers are not exploitable via the described attack paths.

Impact

The vendor-assigned CVSS 4.0 score of 7.8 (High) reflects network delivery, no privilege requirement, and high availability impact with low confidentiality impact, which is broadly accurate. However, two important nuances require explicit statement. First, the CVSS 4.0 vector uses AT:N (no attack requirements), which does not fully capture the prerequisite: the attacker must either operate or compromise the specific MQTT broker the victim subscribes to, or occupy a man-in-the-middle network position capable of injecting into an unencrypted TCP session. Clients connecting only to TLS-secured, trusted brokers are substantially better protected than the AT:N designation implies; AT:P would be more precise. Second, the CVSS 4.0 vector includes the supplemental metric E:P (proof-of-concept exists), which elevates prioritization - the exploit is mechanically trivial once broker access is obtained (a single crafted packet). This is not confirmed active exploitation: the CVE is not listed in the CISA KEV catalog. No EPSS score was provided; the combination of IoT deployment context, plaintext MQTT prevalence, and existing PoC suggests moderate-to-elevated real-world priority for affected deployments, particularly those connecting to public or community brokers over port 1883 without TLS. Confidentiality impact is bounded: heap memory adjacent to the receive buffer may be read before the crash, but the process terminates, limiting how much an attacker can extract in a single interaction.

Exploit ScenarioDerived

An attacker spins up a public MQTT broker and waits for MQTT-C-based IoT devices to connect, or compromises an existing broker serving a fleet of devices; alternatively, an attacker on the same LAN uses ARP spoofing to intercept an unencrypted MQTT session on port 1883. Once in the broker role or injection position, the attacker sends a single PUBLISH packet with topic_name_size set to 0xFFFF and remaining_length set to 7, causing the client's mqtt_unpack_publish_response() to dereference 65,535 bytes past the receive buffer and subsequently call memmove() with a size near 2^32, instantly crashing the client process. A proof-of-concept exists per the CVSS 4.0 E:P indicator, meaning the packet structure required to trigger the crash is publicly known.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 14, 2026

Heap-based out-of-bounds read and integer underflow in LiamBindle MQTT-C (all versions through 1.1.6) allows a remote attacker who controls an MQTT broker - or who can inject packets into an unencrypted MQTT session - to crash any subscribed MQTT-C client and potentially disclose adjacent heap memory by sending a single specially crafted PUBLISH packet. The flaw resides in mqtt_unpack_publish_response() in src/mqtt.c, where the broker-supplied 16-bit topic_name_size field is used to advance a parse pointer without validating it fits within the packet's remaining_length, and the subsequent unsigned subtraction to derive application_message_size wraps to near 2^32 and is passed directly to memmove(). No patched release has been identified at time of analysis; a proof-of-concept is indicated by the CVSS 4.0 E:P supplemental metric, and this vulnerability is not listed in the CISA KEV catalog.

RemediationAI

No vendor-released patched version of MQTT-C has been identified at time of analysis; the available references link only to the upstream repository at https://github.com/LiamBindle/MQTT-C and the specific vulnerable source line, with no associated fix commit, patch advisory, or tagged release. Developers embedding MQTT-C should apply a manual source-level fix to mqtt_unpack_publish_response() in src/mqtt.c: add a bounds validation check immediately after reading topic_name_size that returns a parse error if topic_name_size + 2 (QoS 0) or topic_name_size + 4 (QoS > 0) exceeds remaining_length, before any pointer arithmetic or application_message_size computation. Monitor the upstream repository for an official fix release. As compensating controls pending a patch: first, enforce TLS for all MQTT broker connections to eliminate the traffic-injection vector entirely - clients using TLS cannot have PUBLISH packets injected by a network-positioned attacker, though this does not protect against a compromised or malicious legitimate broker; second, restrict client connections to known, authenticated brokers using mutual TLS or pre-shared key authentication, substantially reducing the broker-control attack surface - note that this requires changes to client and broker configuration and may not be feasible for devices connecting to public brokers; third, run MQTT-C client processes under OS-level process isolation, sandboxing, or watchdog supervision so that a crash is automatically detected and the service restarted, limiting the availability impact to a brief interruption rather than a persistent outage.

Affected VersionsENISA

MQTT-C 0 ≤1.1.6

Affected Packages

euvd mqtt_c no fix

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

MQTT-C (CPE: cpe:2.3:a:liambindle:mqtt-c:*:*:*:*:*:*:*:*) is a portable C implementation of the MQTT 3.1.1 protocol widely embedded in IoT firmware and resource-constrained devices. The vulnerable function mqtt_unpack_publish_response() at src/mqtt.c line 1334 (v1.1.6) deserializes PUBLISH control packets sent by the broker to subscribed clients. Two interacting weaknesses are present. First, CWE-125 (Out-of-Bounds Read): the function checks only that remaining_length is at least 4, then reads the broker-controlled 16-bit topic_name_size field and unconditionally advances the parse pointer by that full value - without checking that topic_name_size plus its two-byte length prefix fits inside the packet boundary. With topic_name_size set to 0xFFFF and remaining_length set to 7, the pointer advances 65,535 bytes beyond the receive buffer into adjacent heap memory. Second, CWE-191 (Integer Underflow): application_message_size is computed as remaining_length - topic_name_size - 2 (QoS 0) or - 4 (QoS > 0) using C unsigned integer arithmetic; when topic_name_size exceeds remaining_length minus overhead the subtraction wraps, producing a value approaching 2^32. That underflowed size is passed unguarded to memmove(), triggering a process crash. The fix class is straightforward: a pre-validation guard such as 'if (topic_name_size + 2 > remaining_length) return error' before any arithmetic would prevent both codepaths.

Know when Mqtt C 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

Vendor (TuranSec) PRIMARY 7.8 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N/E:P/AU:Y/V:D
vuln.today AI 6.5 MEDIUM

AC:H reflects that exploitation requires controlling the victim's MQTT broker or achieving MitM network position - neither is trivial opportunistic access.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (TuranSec).

CVSS VectorVendor: TuranSec

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

LiamBindle MQTT-C through version 1.1.6 contains a heap-based out-of-bounds read and integer underflow in the mqtt_unpack_publish_response() function in src/mqtt.c that allows a remote unauthenticated attacker controlling an MQTT broker - or able to inject MQTT traffic into an unencrypted session - to crash a subscribed MQTT-C client and potentially disclose adjacent heap memory by sending a single crafted PUBLISH packet. The function validates only that the fixed-header remaining_length is at least 4, then reads the 16-bit topic_name_size field from the broker-controlled packet and advances the parse pointer by that value without verifying that topic_name_size plus the surrounding overhead fits within remaining_length; it subsequently computes application_message_size as remaining_length - topic_name_size - 2 (QoS 0) or - 4 (QoS greater than 0) in unsigned arithmetic, producing an integer underflow that is then passed to memmove(). A PUBLISH packet with topic_name_size = 0xFFFF and remaining_length = 7 advances the parse pointer 65535 bytes past the receive buffer (out-of-bounds read) and causes an application_message_size near 2^32, crashing the process when the resulting memmove() is executed.

Executive ViewAI

Why It Matters

LiamBindle MQTT-C library (all versions through 1.1.6) contains a remote denial-of-service and memory disclosure vulnerability allowing network-positioned attackers to crash connected applications and exfiltrate sensitive memory. Publicly available exploit code exists, and no vendor patch has been released, requiring organizations to implement immediate compensating controls.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Enforce TLS/SSL encryption on all MQTT connections to prevent malicious packet injection; (2) Restrict MQTT broker network access to explicitly authorized hosts; (3) Implement network segmentation to contain impact of application crashes; (4) Monitor LiamBindle MQTT-C repository for patched releases; (5) Prepare and test migration plan to alternative MQTT client libraries.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL 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 HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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