Buffer Over-read Affecting cesanta/mongoose package, versions [,7.22)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.41% (37th 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 Buffer Over-read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-CESANTAMONGOOSE-22283399
  • published8 Nov 2026
  • disclosed4 Nov 2026
  • credittuliperis

Introduced: 4 Nov 2026

NewCVE-2026-115473  (opens in a new tab)
CWE-125  (opens in a new tab)
CWE-126  (opens in a new tab)

How to fix?

Upgrade cesanta/mongoose to version 7.22 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 Buffer Over-read via the mg_path_is_sane function in src/util.c. An unauthenticated remote attacker can trigger one-byte reads past the path buffer by sending requests with short paths such as . or /. to applications using mg_http_upload or mg_http_serve_dir. On bare-metal or RTOS targets without memory protection, the read can expose an adjacent heap byte and affect path validation.

Notes

  • At the entry-point step, mg_http_upload receives the attacker-controlled path through the file query parameter (for example, ?file=.); mg_http_serve_dir checks the path passed to it.

CVSS Base Scores

version 4.0
version 3.1