{"id":"CVE-2026-141511","aliases":["DEBIAN-CVE-2026-141511","EUVD-2026-140721","GHSA-94qh-77cf-mpqr","JLSEC-2026-2425"],"status":"published","title":"Mongoose: Out-of-Bounds Read in mg_mqtt_next_topic() Leading to Denial of Service","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-\u003edgram.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.","severity":{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve","others":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","from":"osv"}]},"epss":{"day":"2026-12-04","score":0.00815,"percentile":0.58394,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-125"],"published":"2026-12-01T20:33:57Z","modified":"2026-12-04T21:02:28Z","fixes":[{"ecosystem":"Debian:14","package":"mongoose","fixed_in":["7.22+ds-1"],"sources":["osv"]},{"ecosystem":"Julia","package":"Mongoose_jll","fixed_in":["7.23.0+0"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:14","package":"mongoose","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.22+ds-1"}]}],"versions":["7.21+ds-1","7.21+ds-1~bpo13+1","7.21+ds-2","7.22+ds-1~bpo13+1"]},{"source":"osv","ecosystem":"Julia","package":"Mongoose_jll","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"7.23.0+0"}]}]}],"products":[{"vendor":"automattic","product":"mongoose"},{"vendor":"cesanta","product":"mongoose"}],"references":[{"url":"https://github.com/cesanta/mongoose/security/advisories/GHSA-94qh-77cf-mpqr","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/cesanta/mongoose/pull/3611","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/cesanta/mongoose/commit/a9df523f76f43a38bd53b4232b9cfd4c16869e71","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/cesanta/mongoose/releases/tag/7.22","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/141xxx/CVE-2026-141511.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-141511","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-141511","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-141511","title":"Mongoose: Out-of-Bounds Read in mg_mqtt_next_topic() Leading to Denial of Service","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-\u003edgram.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.","status":"published","published":"2026-12-01T20:33:57.713Z","modified":"2026-12-01T20:46:37.254Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna"}],"cwes":["CWE-125"],"ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"partial","date":"2026-12-01"},"updated_at":"2026-12-01T20:52:01.952063Z"}],"euvd":[{"id":"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-\u003edgram.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.","status":"published","published":"2026-12-01T20:33:57Z","modified":"2026-12-01T20:46:37Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-12-01T22:20:53.110688Z"}],"nvd":[{"id":"CVE-2026-141511","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-\u003edgram.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.","status":"published","published":"2026-12-01T21:17:11.497Z","modified":"2026-12-03T19:56:31.4Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-125"],"ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"partial","date":"2026-12-01"},"updated_at":"2026-12-03T20:00:27.689537Z"}],"osv":[{"id":"CVE-2026-141511","title":"Mongoose: Out-of-Bounds Read in mg_mqtt_next_topic() Leading to Denial of Service","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-\u003edgram.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.","status":"published","published":"2026-12-01T20:33:57.713Z","modified":"2026-12-04T21:02:28.604771329Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-125"],"updated_at":"2026-12-02T21:28:42.350468Z"},{"id":"DEBIAN-CVE-2026-141511","upstream":["CVE-2026-141511"],"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-\u003edgram.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.","status":"published","published":"2026-12-01T21:17:11.497Z","modified":"2026-12-04T10:00:33.362178881Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-12-04T10:06:32.847389Z"},{"id":"JLSEC-2026-2425","upstream":["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-\u003edgram.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.","status":"published","published":"2026-12-04T19:49:13.191Z","modified":"2026-12-04T20:00:04.314806Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"},{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-12-04T20:26:44.691545Z"}]}}
