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

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-12-01T20:33:57.713Z
- Modified: 2026-12-01T20:46:37.254Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- cesanta mongoose: < 7.22

## References

- <https://github.com/cesanta/mongoose/security/advisories/GHSA-94qh-77cf-mpqr>
- <https://github.com/cesanta/mongoose/pull/3611>
- <https://github.com/cesanta/mongoose/commit/a9df523f76f43a38bd53b4232b9cfd4c16869e71>
- <https://github.com/cesanta/mongoose/releases/tag/7.22>

## Sources

- CVE List: [CVE-2026-141511](https://www.cve.org/CVERecord?id=CVE-2026-141511), CVE Terms of Use, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-141511 · Whole record: https://cve.day/CVE-2026-141511.json · Rebuilt by cve.day 2026-12-01T20:52:21.447Z
