CVE-2026-54412
MQTT-C Heap Out-of-Bounds Read and Integer Underflow
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.
INFO
Published Date :
June 14, 2026, 6:17 p.m.
Last Modified :
July 24, 2026, 12:10 p.m.
Remotely Exploit :
Yes !
Source :
309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
Affected Products
The following products are affected by CVE-2026-54412
vulnerability.
Even if cvefeed.io is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
No affected product recoded yet
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | HIGH | 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c | ||||
| CVSS 3.1 | HIGH | MITRE-CVE | ||||
| CVSS 4.0 | HIGH | 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c | ||||
| CVSS 4.0 | HIGH | 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c |
Solution
- Update MQTT-C to a version later than 1.1.6.
- Apply vendor patches for the identified vulnerability.
- Validate packet handling logic for remaining_length.
- Ensure topic name size checks prevent buffer overflows.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-54412.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-54412 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-54412
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-54412 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-54412 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Jul. 24, 2026
Action Type Old Value New Value Changed Translation Title: MQTT-C de LiamBindle, Description: LiamBindle MQTT-C hasta la versión 1.1.6 contiene una lectura fuera de límites basada en el heap y un desbordamiento negativo de enteros en la función mqtt_unpack_publish_response() en src/mqtt.c que permite a un atacante remoto no autenticado que controla un broker MQTT - o capaz de inyectar tráfico MQTT en una sesión no cifrada - provocar la caída de un cliente MQTT-C suscrito y potencialmente divulgar memoria adyacente del heap enviando un único paquete PUBLISH manipulado. La función solo valida que el remaining_length del encabezado fijo sea al menos 4, luego lee el campo topic_name_size de 16 bits del paquete controlado por el broker y avanza el puntero de análisis por ese valor sin verificar que topic_name_size más la sobrecarga circundante encaje dentro de remaining_length; posteriormente calcula application_message_size como remaining_length - topic_name_size - 2 (QoS 0) o - 4 (QoS mayor que 0) en aritmética sin signo, produciendo un desbordamiento negativo de enteros que luego se pasa a memmove(). Un paquete PUBLISH con topic_name_size = 0xFFFF y remaining_length = 7 avanza el puntero de análisis 65535 bytes más allá del búfer de recepción (lectura fuera de límites) y provoca un application_message_size cercano a 2^32, provocando la caída del proceso cuando se ejecuta el memmove() resultante. Title: MQTT-C de LiamBindle, Description: LiamBindle MQTT-C hasta la versión 1.1.6 contiene una lectura fuera de límites basada en el heap y un desbordamiento negativo de enteros en la función mqtt_unpack_publish_response() en src/mqtt.c que permite a un atacante remoto no autenticado que controla un broker MQTT - o capaz de inyectar tráfico MQTT en una sesión no cifrada - provocar la caída de un cliente MQTT-C suscrito y potencialmente divulgar memoria adyacente del heap enviando un único paquete PUBLISH manipulado. La función solo valida que el remaining_length del encabezado fijo sea al menos 4, luego lee el campo topic_name_size de 16 bits del paquete controlado por el broker y avanza el puntero de análisis por ese valor sin verificar que topic_name_size más la sobrecarga circundante encaje dentro de remaining_length; posteriormente calcula application_message_size como remaining_length - topic_name_size - 2 (QoS 0) o - 4 (QoS mayor que 0) en aritmética sin signo, produciendo un desbordamiento negativo de enteros que luego se pasa a memmove(). Un paquete PUBLISH con topic_name_size = 0xFFFF y remaining_length = 7 avanza el puntero de análisis 65535 bytes más allá del búfer de recepción (lectura fuera de límites) y provoca un application_message_size cercano a 2^32, provocando la caída del proceso cuando se ejecuta el memmove() resultante. -
CVE Translated by [email protected]
Jul. 23, 2026
Action Type Old Value New Value Added Translation Title: MQTT-C de LiamBindle, Description: LiamBindle MQTT-C hasta la versión 1.1.6 contiene una lectura fuera de límites basada en el heap y un desbordamiento negativo de enteros en la función mqtt_unpack_publish_response() en src/mqtt.c que permite a un atacante remoto no autenticado que controla un broker MQTT - o capaz de inyectar tráfico MQTT en una sesión no cifrada - provocar la caída de un cliente MQTT-C suscrito y potencialmente divulgar memoria adyacente del heap enviando un único paquete PUBLISH manipulado. La función solo valida que el remaining_length del encabezado fijo sea al menos 4, luego lee el campo topic_name_size de 16 bits del paquete controlado por el broker y avanza el puntero de análisis por ese valor sin verificar que topic_name_size más la sobrecarga circundante encaje dentro de remaining_length; posteriormente calcula application_message_size como remaining_length - topic_name_size - 2 (QoS 0) o - 4 (QoS mayor que 0) en aritmética sin signo, produciendo un desbordamiento negativo de enteros que luego se pasa a memmove(). Un paquete PUBLISH con topic_name_size = 0xFFFF y remaining_length = 7 avanza el puntero de análisis 65535 bytes más allá del búfer de recepción (lectura fuera de límites) y provoca un application_message_size cercano a 2^32, provocando la caída del proceso cuando se ejecuta el memmove() resultante. -
CVE Modified by 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://github.com/LiamBindle/MQTT-C', 'vendor': 'LiamBindle', 'product': 'MQTT-C', 'versions': [{'status': 'affected', 'version': '0', 'versionType': 'semver', 'lessThanOrEqual': '1.1.6'}], 'programFiles': ['src/mqtt.c'], 'collectionURL': 'https://github.com/LiamBindle/MQTT-C', 'defaultStatus': 'unknown', 'programRoutines': [{'name': 'mqtt_unpack_publish_response'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-54412', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'yes'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-06-15T17:01:08.771614Z'} -
New CVE Received by 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
Jun. 14, 2026
Action Type Old Value New Value Added 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. Added CVSS V4.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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:Y/R:X/V:D/RE:X/U:X Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H Added CWE CWE-125 Added CWE CWE-191 Added Reference https://cwe.mitre.org/data/definitions/125.html Added Reference https://cwe.mitre.org/data/definitions/191.html Added Reference https://github.com/LiamBindle/MQTT-C Added Reference https://github.com/LiamBindle/MQTT-C/blob/v1.1.6/src/mqtt.c#L1334