Cesanta has released Mongoose 7.24 to fix seven vulnerabilities in its embedded networking library. The worst is a Mongoose heap overflow rated CVSS 9.8 that may allow remote code execution without authentication. Trend Micro’s Zero Day Initiative (ZDI) reported it.
TL;DR
The flaws hit Mongoose’s built-in TCP/IP stack, TLS stack and WebSocket parser. Two are rated critical, and most need no login. Several advisories include proof-of-concept material, but no exploitation in the wild has been confirmed.
Why It Matters
Embedded Devices Are Hard to Patch
Mongoose runs inside firmware for industrial and IoT devices. According to researcher Simone Margaritelli (evilsocket), Cesanta claims deployment on “hundreds of millions of devices.” That figure is the vendor’s own estimate. Either way, each device maker must rebuild and ship new firmware, which often takes months.
No Login, No Protocol Needed
Mongoose is a popular embedded web server and networking library. That makes the new Mongoose heap overflow especially serious. It fires at the TCP layer, before any HTTP, MQTT, TLS or WebSocket parsing begins. In other words, application login screens offer no protection.
A Second Wave This Year
This is not the first batch of Mongoose bugs in 2026. In April, Mongoose 7.21 fixed CVE-2026-5244 and CVE-2026-5245, both pre-auth RCE flaws. Now, the Mongoose security advisories add seven more issues affecting 7.23 and earlier.
How the Attack Works
Mongoose Heap Overflow in MIP (CVSS 9.8)
ZDI found the bug in read_conn(), part of the MIP built-in TCP/IP stack. A TCP FIN packet that carries data skips the buffer resize check. As a result, the data is copied past the end of a heap buffer.
The advisory calls it “a textbook heap overflow primitive for arbitrary code execution.” It adds that the bug is “unauthenticated, pre-protocol” and needs “only network access to any open TCP port.” MIP also targets microcontrollers that lack ASLR and stack canaries.
WebSocket Frame Injection (CVSS 9.3)
On 32-bit platforms, the WebSocket parser truncates 64-bit payload lengths. A crafted length can wrap to zero, so the following bytes become new frames. The advisory warns this enables “pre-authentication message injection” and, on control dashboards, “full control without any login.” ESP32, STM32 and RP2040 boards run 32-bit code.
TLS and Network Parsing Bugs
- Certificate timestamp (7.5): a month value of zero causes an out-of-bounds read during the TLS handshake.
- ECDSA signature parsing (7.5): oversized lengths in a certificate signature crash the process.
- ClientHello extensions (high): a truncated extension block causes a heap out-of-bounds read.
- IPv6 checksum (7.5): a crafted IPv6 packet with extension headers causes an out-of-bounds read.
- IP SAN check (7.4): the TLS client can accept a certificate for the wrong IP address if its Subject CN matches.
Most of these crash the device. However, some may leak memory on 32-bit systems.
Affected Versions
- Mongoose 7.23 and earlier
- The IP SAN bypass affects 7.19 through 7.23
Exposure depends on build options. For example, the MIP and IPv6 bugs need the built-in TCP/IP stack. Likewise, the TLS bugs need the built-in TLS backend, MG_TLS_BUILTIN.
Patch and Mitigation
Upgrade to Mongoose 7.24 and rebuild your firmware. The advisories list no workarounds, and no CVE IDs have been assigned yet.
Steps for Device Makers
- Check which Mongoose version and build flags your products use.
- Ship firmware updates for devices that expose MIP, WebSocket or TLS services.
- Limit network access to embedded management interfaces.
Steps for Device Owners
Ask vendors whether their products embed Mongoose. Meanwhile, keep IoT and industrial devices off the open internet. Finally, apply firmware updates as soon as vendors release them, because every Mongoose heap overflow fix depends on that rebuild.
Support Our Threat Intelligence
Find our vulnerability reports and weekly recaps helpful? Support our work today and unlock a 100% ad-free reading experience!