Improper Enforcement of Behavioral Workflow Affecting cesanta/mongoose package, versions [7.4,7.24)


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.46% (42nd 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 Improper Enforcement of Behavioral Workflow vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-CESANTAMONGOOSE-22743214
  • published23 Nov 2026
  • disclosed20 Nov 2026
  • creditAbbos Eshmurzayev

Introduced: 20 Nov 2026

NewCVE-2026-106024  (opens in a new tab)
CWE-841  (opens in a new tab)

How to fix?

Upgrade cesanta/mongoose to version 7.24 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 Improper Enforcement of Behavioral Workflow in the mg_ws_cb function in src/ws.c, which tracks fragmented-message reassembly only by the offset ofs and keeps no state for whether a TEXT or BINARY start frame has been received. A lone CONTINUATION frame with FIN=1 sent as the first frame is treated as a completed fragmented message, so mg_ws_cb reads the first payload byte into mg_ws_message.flags and delivers the remainder as the message body through MG_EV_WS_MSG, and never closes the connection as RFC 6455 Section 5.4 requires. An unauthenticated peer that completes the WebSocket handshake can send one such frame to deliver a message whose flags field is fully attacker-controlled and whose payload is truncated by one byte. The effect is limited to WebSocket message-metadata integrity and content on the affected connection, with no memory corruption, and matters most for applications that trust or branch on mg_ws_message.flags.

CVSS Base Scores

version 4.0
version 3.1