Mongoose: Out-of-Bounds Read in mg_mqtt_next_topic() Leading to Denial of Service
- CVE-2026-141511
- EUVD-2026-140721
Description
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.
Text from the CVE.org record.
Recommendation
cesanta mongoose
- If you run a version before 7.22update to 7.22 or later
Taken from the version ranges of the NVD record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
cesanta mongoose
Affected versions Fixed in before 7.22 7.22
Product versions from the NVD record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.