Out-of-bounds Read Affecting cesanta/mongoose package, versions [,7.23)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.23% (13th 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 Out-of-bounds Read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-CESANTAMONGOOSE-20948706
  • published15 Oct 2026
  • disclosed14 Oct 2026
  • creditHuihui Huang

Introduced: 14 Oct 2026

NewCVE-2026-73260  (opens in a new tab)
CWE-125  (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 Out-of-bounds Read in the mg_der_to_tlv function, whose long-form length branch validates the count of length octets but never checks the decoded content length against the remaining buffer, so mg_der_parse can report more bytes consumed than the enclosing element holds and the parent->len -= (uint32_t) consumed subtraction in mg_der_next underflows. An attacker acting as a TLS peer can crash the process by presenting an X.509 certificate in which an element declares a long-form length exceeding its parent, after which parent->value points past the buffer and mg_tls_parse_cert_der keeps advancing that pointer forward through memory on each iteration. This affects builds with MG_TLS set to MG_TLS_BUILTIN, requires a target with an MMU for the read to fault, and is reachable in both directions, against a client from a server or MitM position and against a server that requests and parses client certificates, since the preceding certificate message unpacking validates only the chain and per-certificate length framing.

CVSS Base Scores

version 4.0
version 3.1