CVE-2026-73261: Mongoose: handle_opt() missing opts[1] > len check — 1-byte OOB read corrupts TCP MSS, silences mg_send() per connection
Mongoose is an embedded web server and network library. Prior to 7.23, the built-in TCP/IP stack enabled by MGENABLETCPIP in src/netbuiltin.c does not reject a TCP option whose declared opts[1] length exceeds the remaining option bytes. In handleopt(), a NOP followed by a truncated MSS option causes opts[3] to be read outside the declared options area and used as the low byte of dmss. An unauthenticated remote peer can corrupt the per-connection MSS value so later mgsend() calls transmit truncated or zero-length application payloads while the TCP connection otherwise appears healthy. This issue is fixed in version 7.23.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Mongooseto a version that resolves this vulnerability.Fixed in 7.23
Event History
Frequently Asked Questions
Which Mongoose deployments are affected?
Deployments using the built-in TCP/IP stack enabled by MG_ENABLE_TCPIP in src/net_builtin.c are affected before version 7.23.
Does exploitation require authentication or application-level interaction?
No. An unauthenticated remote peer can trigger the issue by sending TCP options that include a NOP followed by a truncated MSS option.
What operational symptom could indicate exploitation?
The affected connection can remain apparently healthy while subsequent mg_send() calls transmit truncated or zero-length application payloads. The corruption is limited to the per-connection MSS value.
What version resolves the issue?
The issue is fixed in Mongoose version 7.23.