CVE-2026-141470: Mongoose: IPv6 TCP packet can cause a null dereference while matching an IPv4 connection
Mongoose is an embedded web server and network library. From 7.21 until 7.24, Mongoose's built-in TCP/IP stack with MGENABLETCPIP and MGENABLEIPV6 enabled can dereference a null IPv4 header in getpeer() in src/netbuiltin.c when rxtcp() receives an IPv6/TCP packet whose source and destination ports match an established IPv4 connection. The cross-family lookup reaches pkt->ip->src even though only pkt->ip6 is present, allowing a network attacker able to deliver IPv6 packets to crash the process or networking task. This issue is fixed in 7.24.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
mongooseto a version that resolves this vulnerability.Fixed in 7.24
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments using Mongoose versions from 7.21 until 7.24 with the built-in TCP/IP stack enabled through MG_ENABLE_TCPIP and IPv6 enabled through MG_ENABLE_IPV6 are affected. Systems without that combination are not described as affected.
What must an attacker be able to do to trigger the crash?
An attacker must be able to deliver IPv6 TCP packets to the target. The packet's source and destination ports must match an established IPv4 connection so that the cross-family connection lookup is reached.
What is the impact of successful exploitation?
The null dereference can crash the Mongoose process or networking task. The provided information describes denial of service through a crash.
What should be done if an immediate upgrade is not possible?
The available data identifies the vulnerable feature combination as MG_ENABLE_TCPIP and MG_ENABLE_IPV6. Disabling IPv6 or the built-in TCP/IP stack, where operationally feasible, removes the stated affected configuration; otherwise restrict delivery of IPv6 packets to the service.