{
    "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-08-10T11:43:58.406Z"
    },
    "containers": {
        "cna": {
            "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 a victim has subscribed to - crashes a subscribed MQTT-C client by sending a single crafted PUBLISH packet whose topic_name_size exceeds the remaining_length field. The vulnerable client advances the parse pointer into unmapped heap memory (out-of-bounds read primitive that may also disclose adjacent heap bytes), then computes application_message_size as an unsigned subtraction that underflows to a value near 2^32, and finally passes that value to memmove(), crashing the process. Any IoT or embedded device built on MQTT-C that connects to a shared, untrusted, or compromised broker is reachable for repeated, 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",
                            "lessThanOrEqual": "1.1.6",
                            "versionType": "semver"
                        }
                    ],
                    "defaultStatus": "unknown"
                }
            ],
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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.",
                    "supportingMedia": [
                        {
                            "type": "text/html",
                            "base64": false,
                            "value": "<p>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.</p>"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://github.com/LiamBindle/MQTT-C",
                    "name": "LiamBindle/MQTT-C - upstream repository (unmaintained since 2022-10-27)",
                    "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://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 that the victim client has subscribed to, sends one crafted packet with topic_name_size = 0xFFFF and remaining_length = 7 to crash an MQTT-C-based client process and optionally disclose adjacent heap bytes through the out-of-bounds read primitive."
                        }
                    ],
                    "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_author": "Saidakbarxon Maxsudxonov",
            "x_assigner_notes": "The vulnerable mqtt_unpack_publish_response() body was verified at exactly the v1.1.6 release tag and at master HEAD; the two are byte-identical for this function. The function performs only a 'remaining_length >= 4' fixed-header sanity check (mqtt.c:1349) and then trusts the broker-controlled 16-bit topic_name_size field at mqtt.c:1354 both as a pointer offset (mqtt.c:1357) and as a subtrahend in the unsigned application_message_size computation (mqtt.c:1367/1369). The last commit to LiamBindle/MQTT-C on master is dated 2022-10-27; the project appears unmaintained and no upstream fix is available. defaultStatus is 'unknown' pending vendor confirmation. CVSS 4.0 is scored 8.7 HIGH and CVSS 3.1 is scored 8.2 HIGH, treating the OOB read as VC:L/C:L (limited heap-byte disclosure subject to allocator layout, often masked by the immediately following crash) and the integer-underflow-driven memmove() crash as VA:H/A:H. Mitigation guidance for downstream consumers: validate topic_name_size + 2 + (qos_level > 0 ? 2 : 0) <= remaining_length before using topic_name_size as a pointer offset or as a subtrahend, or migrate to a maintained MQTT client library (e.g. Eclipse Paho MQTT C, libmosquitto).",
            "title": "MQTT-C Heap Out-of-Bounds Read and Integer Underflow in mqtt_unpack_publish_response()",
            "providerMetadata": {
                "orgId": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
                "shortName": "TuranSec",
                "dateUpdated": "2026-08-10T11:43:58.406Z"
            },
            "datePublic": "2026-06-14T17:26:36.740Z"
        },
        "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"
                }
            }
        ]
    }
}