{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-54412",
        "assignerOrgId": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
        "state": "PUBLISHED",
        "assignerShortName": "TuranSec",
        "dateReserved": "2026-06-13T16:39:46.122Z",
        "datePublished": "2026-06-14T17:26:36.740Z",
        "dateUpdated": "2026-12-02T14:58:23.735Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
                "shortName": "TuranSec",
                "dateUpdated": "2026-12-02T14:58:23.735Z"
            },
            "title": "MQTT-C Heap Out-of-Bounds Read and Integer Underflow in mqtt_unpack_publish_response()",
            "datePublic": "2026-06-14T17:26:00.000Z",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "cweId": "CWE-125",
                            "description": "CWE-125 Out-of-bounds Read",
                            "type": "CWE"
                        }
                    ]
                },
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "cweId": "CWE-191",
                            "description": "CWE-191 Integer Underflow (Wrap or Wraparound)",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "impacts": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "value": "A remote attacker controlling an MQTT broker, or able to inject one PUBLISH packet into an unencrypted MQTT session to which a victim has subscribed, can crash a subscribed MQTT-C client by sending a crafted PUBLISH packet whose topic_name_size exceeds the remaining_length field. The vulnerable client advances the parse pointer into unmapped heap memory, causing an out-of-bounds read that may expose adjacent heap bytes. It then calculates application_message_size using unsigned subtraction, causing an integer underflow to a value near 2^32, and passes that value to memmove(), crashing the process. IoT and embedded devices using MQTT-C with shared, untrusted, or compromised brokers are exposed to unauthenticated denial of service."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "vendor": "LiamBindle",
                    "product": "MQTT-C",
                    "collectionURL": "https://github.com/LiamBindle/MQTT-C",
                    "repo": "https://github.com/LiamBindle/MQTT-C",
                    "programFiles": [
                        "src/mqtt.c"
                    ],
                    "programRoutines": [
                        {
                            "name": "mqtt_unpack_publish_response"
                        }
                    ],
                    "versions": [
                        {
                            "status": "affected",
                            "version": "0",
                            "lessThan": "1.1.7",
                            "versionType": "semver"
                        },
                        {
                            "status": "unaffected",
                            "version": "1.1.7",
                            "versionType": "semver"
                        }
                    ],
                    "defaultStatus": "unaffected"
                }
            ],
            "descriptions": [
                {
                    "lang": "en",
                    "value": "LiamBindle MQTT-C versions prior to 1.1.7 contain a heap-based out-of-bounds read and integer underflow in the mqtt_unpack_publish_response() function in src/mqtt.c. A remote unauthenticated attacker controlling an MQTT broker, or capable of injecting MQTT traffic into an unencrypted session, can crash a subscribed MQTT-C client and potentially disclose adjacent heap memory by sending a single crafted PUBLISH packet.",
                    "supportingMedia": [
                        {
                            "type": "text/html",
                            "base64": false,
                            "value": "<p>LiamBindle MQTT-C versions prior to 1.1.7 contain a heap-based out-of-bounds read and integer underflow in the mqtt_unpack_publish_response() function in src/mqtt.c. A remote unauthenticated attacker controlling an MQTT broker, or capable of injecting MQTT traffic into an unencrypted session, can crash a subscribed MQTT-C client and potentially disclose adjacent heap memory by sending a single crafted PUBLISH packet.</p>"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://github.com/LiamBindle/MQTT-C",
                    "name": "LiamBindle/MQTT-C upstream repository",
                    "tags": [
                        "product"
                    ]
                },
                {
                    "url": "https://github.com/LiamBindle/MQTT-C/blob/v1.1.6/src/mqtt.c#L1334",
                    "name": "Vulnerable mqtt_unpack_publish_response() in src/mqtt.c (v1.1.6)",
                    "tags": [
                        "product"
                    ]
                },
                {
                    "url": "https://github.com/LiamBindle/MQTT-C/pull/208",
                    "name": "Fix out-of-bounds read and integer underflow in PUBLISH parsing",
                    "tags": [
                        "patch"
                    ]
                },
                {
                    "url": "https://github.com/LiamBindle/MQTT-C/releases/tag/v1.1.7",
                    "name": "MQTT-C v1.1.7 release",
                    "tags": [
                        "release-notes",
                        "patch"
                    ]
                },
                {
                    "url": "https://cwe.mitre.org/data/definitions/125.html",
                    "name": "CWE-125: Out-of-bounds Read",
                    "tags": [
                        "technical-description"
                    ]
                },
                {
                    "url": "https://cwe.mitre.org/data/definitions/191.html",
                    "name": "CWE-191: Integer Underflow (Wrap or Wraparound)",
                    "tags": [
                        "technical-description"
                    ]
                }
            ],
            "metrics": [
                {
                    "format": "CVSS",
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "A malicious MQTT broker, or a network attacker capable of injecting a single MQTT PUBLISH packet into an unencrypted session to which the victim client has subscribed, sends a crafted packet with topic_name_size = 0xFFFF and remaining_length = 7 to crash an MQTT-C-based client process and potentially disclose adjacent heap bytes."
                        }
                    ],
                    "cvssV4_0": {
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "attackRequirements": "NONE",
                        "privilegesRequired": "NONE",
                        "userInteraction": "NONE",
                        "vulnConfidentialityImpact": "LOW",
                        "subConfidentialityImpact": "NONE",
                        "vulnIntegrityImpact": "NONE",
                        "subIntegrityImpact": "NONE",
                        "vulnAvailabilityImpact": "HIGH",
                        "subAvailabilityImpact": "NONE",
                        "exploitMaturity": "PROOF_OF_CONCEPT",
                        "Safety": "NOT_DEFINED",
                        "Automatable": "YES",
                        "Recovery": "NOT_DEFINED",
                        "valueDensity": "DIFFUSE",
                        "vulnerabilityResponseEffort": "NOT_DEFINED",
                        "providerUrgency": "NOT_DEFINED",
                        "version": "4.0",
                        "baseSeverity": "HIGH",
                        "baseScore": 7.8,
                        "vectorString": "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"
                    }
                },
                {
                    "format": "CVSS",
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "GENERAL"
                        }
                    ],
                    "cvssV3_1": {
                        "version": "3.1",
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "privilegesRequired": "NONE",
                        "userInteraction": "NONE",
                        "scope": "UNCHANGED",
                        "confidentialityImpact": "LOW",
                        "integrityImpact": "NONE",
                        "availabilityImpact": "HIGH",
                        "baseSeverity": "HIGH",
                        "baseScore": 8.2,
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H"
                    }
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "Saidakbarxon Maxsudxonov",
                    "type": "finder"
                }
            ],
            "source": {
                "discovery": "EXTERNAL"
            },
            "x_generator": {
                "engine": "Vulnogram 1.0.5"
            },
            "x_author": "Saidakbarxon Maxsudxonov",
            "x_assigner_notes": "The vulnerable mqtt_unpack_publish_response() implementation was verified at the v1.1.6 release tag. The function performs a remaining_length >= 4 fixed-header sanity check but trusts the broker-controlled 16-bit topic_name_size field as a pointer offset and as a subtrahend in the unsigned application_message_size calculation. This can result in an out-of-bounds read and integer underflow, followed by a potentially oversized memmove() operation and process crash. The upstream fix is referenced in PR #208 and MQTT-C v1.1.7 release notes. Versions prior to 1.1.7 are affected; version 1.1.7 is considered unaffected. Mitigation: validate that topic_name_size + 2 + (qos_level > 0 ? 2 : 0) does not exceed remaining_length before using topic_name_size as a pointer offset or subtrahend, or migrate to a maintained MQTT client library such as Eclipse Paho MQTT C or libmosquitto."
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-06-15T17:01:08.771614Z",
                                "id": "CVE-2026-54412",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "yes"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-06-15T17:01:16.924Z"
                }
            }
        ]
    }
}