CVE-2026-54412

HIGH

Liambindle Mqtt-c < 1.1.6 - Out-of-bounds Read

Title source: rule
STIX 2.1

Description

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.

References (4)

Core 4
Core References
Product product
Vulnerable mqtt_unpack_publish_response() in src/mqtt.c (v1.1.6)
https://github.com/LiamBindle/MQTT-C/blob/v1.1.6/src/mqtt.c#L1334
Technical Description technical-description
CWE-125: Out-of-bounds Read
https://cwe.mitre.org/data/definitions/125.html
Technical Description technical-description
CWE-191: Integer Underflow (Wrap or Wraparound)
https://cwe.mitre.org/data/definitions/191.html
Product product
LiamBindle/MQTT-C - upstream repository (unmaintained since 2022-10-27)
https://github.com/LiamBindle/MQTT-C

Scores

CVSS v3 8.2
EPSS 0.0041
EPSS Percentile 32.2%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable yes
Technical Impact partial

Details

CWE
CWE-125 CWE-191
Status published
Products (1)
LiamBindle/MQTT-C < 1.1.6
Published Jun 14, 2026
Tracked Since Jun 14, 2026