Mongoose is an embedded web server and network library. Prior to 7.22, the Mongoose MQTT broker tutorial's mg_mqtt_next_topic() function can read two bytes beyond msg->dgram.len when a malformed MQTT SUBSCRIBE packet supplies a topic position that does not leave enough bytes for the topic-length field. Because tutorials/mqtt/mqtt-server/main.c reads that field without validating the complete two-byte access against the datagram boundary, an unauthenticated remote MQTT client can trigger invalid memory access and crash the broker. This issue is fixed in 7.22.
{
"license": "CC-BY-4.0",
"sources": [
{
"affected": {
"cesanta:mongoose": [
"< 7.22"
]
},
"database_specific": {
"status": "Analyzed"
},
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-141511",
"id": "CVE-2026-141511",
"imported": "2026-12-03T21:20:36.288Z",
"modified": "2026-12-03T19:56:31.400Z",
"published": "2026-12-01T21:17:11.497Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-141511"
},
{
"affected": {
"Cesanta:Mongoose": [
"< 7.22"
]
},
"html_url": "https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-140721",
"id": "EUVD-2026-140721",
"imported": "2026-12-03T21:20:36.289Z",
"modified": "2026-12-01T20:46:37Z",
"published": "2026-12-01T20:33:57Z",
"url": "https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2026-140721"
}
]
}