Heap-based Buffer Overflow Affecting cesanta/mongoose package, versions [,7.23)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.24% (14th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Heap-based Buffer Overflow vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-CESANTAMONGOOSE-20948701
  • published15 Oct 2026
  • disclosed14 Oct 2026
  • creditlihnucs

Introduced: 14 Oct 2026

NewCVE-2026-63626  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade cesanta/mongoose to version 7.23 or higher.

Overview

cesanta/mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs for TCP, UDP, HTTP, WebSocket, MQTT.

Affected versions of this package are vulnerable to Heap-based Buffer Overflow in the ppp_handle_ipv6cp function in src/l2_ppp.c, which confirms only that the frame meets the minimum header size and then passes the 16-bit len field read from it to ppp_tx_frame without comparing it against the received payload size. An attacker on the same PPP or PPPoE link can read heap memory past recv_queue.buf and have it reflected back in the IPv6CP Configure-Reject reply, and overflow the 1504-byte tx.buf by up to about 64 KB into adjacent allocations, by sending a 10-byte Configure-Request declaring len as 65535, which reaches memcpy(pay, ipv6cpp, len), while any len between 10 and 65534 instead reaches find_opt, which has no guard for p[1] == 0 and loops forever on a zero byte, hanging the event loop with no recovery short of a restart. This requires a build with MG_ENABLE_TCPIP=1 and MG_ENABLE_IPV6=1 over a PPP or PPPoE link layer, plus s_link set by a prior LCP exchange, which the attacker also drives.

CVSS Base Scores

version 4.0
version 3.1