Skip to content

CVE-2026-141511 Mongoose: Out-of-Bounds Read in mg_mqtt_next_topic() Leading to Denial of Service

HighCVSS 8.7 EPSS 0.73%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial
Technology
Debian

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.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
cesanta mongoose < 7.22; = < 7.22 7.22 Fixed
debian/mongoose(Debian 14) < 7.22+ds-1; = 7.21+ds-1; = 7.21+ds-1~bpo13+1; = 7.21+ds-2 +1 more 7.22+ds-1 Fixed

Affected products

ProductAffected versionsFixed in
cesanta mongoose = < 7.22 No fix listed
debian/mongoose(Debian:14) < 7.22+ds-1 7.22+ds-1
debian/mongoose(Debian:14) = 7.21+ds-1 No fix listed
debian/mongoose(Debian:14) = 7.21+ds-1~bpo13+1 No fix listed
debian/mongoose(Debian:14) = 7.21+ds-2 No fix listed
debian/mongoose(Debian:14) = 7.22+ds-1~bpo13+1 No fix listed
cesanta mongoose < 7.22 7.22

References