CVE-2026-73252

Mongoose: Unauthenticated remote heap out-of-bounds read in built-in TLS: off-by-one length check in mg_tls_recv_record() underflows recv_len to SIZE_MAX

Published Oct 14, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
Mongoose is an embedded web server and network library. Prior to 7.23, the built-in TLS stack selected by MG_TLS_BUILTIN in src/tls_builtin.c accepts a TLS 1.3 record whose decrypted size is exactly the 16-byte authentication tag with no plaintext or ContentType byte. In mg_tls_recv_record(), the msgsz length check permits that record and the recv_len calculation underflows to SIZE_MAX, so a later handshake step treats stale buffer contents as a trusted message with an effectively unbounded length. An unauthenticated malicious TLS peer can trigger a heap out-of-bounds read before certificate or Finished validation, causing a remote denial of service. This issue is fixed in version 7.23.

Analysis

AI-generated

Technical impact

Mongoose is an embedded web server and network library; a flaw in the built‑in TLS stack allows an unauthenticated remote peer to send a TLS 1.3 record whose decrypted payload is only the 16‑byte authentication tag. Due to an off‑by‑one length check, the record bypasses proper size validation and causes an underflow in the recv_len calculation, resulting in a heap out‑of‑bounds read before certificate or Finished verification. The attacker can trigger this so that the library treats stale buffer data as a trusted message with an effectively unbounded length. The effect is a remote denial‑of‑service that can be activated without prior authentication or cryptographic credentials. This weakness is exemplified by CWE‑125 (Out‑of‑Bounds Read) and CWE‑191 (Signed/Unsigned Conversion Error).

Affected Systems

Any installation of cesanta’s mongoose library that uses the built‑in TLS stack (MG_TLS_BUILTIN) and is running a version earlier than 7.23 is affected. The issue was fixed in mongoose 7.23, so all releases 7.23 and later are not vulnerable. Users who deploy mongoose inside web servers, embedded devices, or networking software should confirm which major version they have and upgrade accordingly.

Risk and Exploitability

The CVSS score of 7.5 indicates high severity, and the vulnerability can be triggered remotely by sending a carefully crafted TLS 1.3 record to a listening server. No EPSS data is available, so the current exploitation probability cannot be quantified; the issue is not listed in the CISA KEV catalog, suggesting no known widespread exploitation yet. However, because the flaw allows the attacker to execute code that reads arbitrary heap contents, the potential impact on confidentiality, integrity, or availability is significant. An attacker only needs to open a network connection to the affected server; authentication is not required. If the built‑in TLS feature is mandatory, the risk remains until the library is upgraded.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade cesanta mongoose to version 7.23 or later.
  • Temporarily disable the built‑in TLS stack by setting MG_TLS_BUILTIN to false if it is not required, and use an external TLS implementation instead.
  • Monitor TLS handshake logs for unusually small record sizes or repeated handshake failures that may indicate attempted exploitation.

Generated by OpenCVE AI on October 15, 2026 at 13:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Cesanta
Cesanta mongoose
Vendors & Products Cesanta
Cesanta mongoose
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Mongoose is an embedded web server and network library. Prior to 7.23, the built-in TLS stack selected by MG_TLS_BUILTIN in src/tls_builtin.c accepts a TLS 1.3 record whose decrypted size is exactly the 16-byte authentication tag with no plaintext or ContentType byte. In mg_tls_recv_record(), the msgsz length check permits that record and the recv_len calculation underflows to SIZE_MAX, so a later handshake step treats stale buffer contents as a trusted message with an effectively unbounded length. An unauthenticated malicious TLS peer can trigger a heap out-of-bounds read before certificate or Finished validation, causing a remote denial of service. This issue is fixed in version 7.23.
Title Mongoose: Unauthenticated remote heap out-of-bounds read in built-in TLS: off-by-one length check in mg_tls_recv_record() underflows recv_len to SIZE_MAX
Weaknesses CWE-125
CWE-191
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-125

    Out-of-bounds Read

  • CWE-191

    Integer Underflow (Wrap or Wraparound)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 14, 2026, 7:41 PM
Reserved
Aug 11, 2026, 5:18 PM
Status
Deferred
Published
Oct 14, 2026, 7:17 PM
Modified
Oct 16, 2026, 8:04 PM