CVE-2026-110486

Remote heap out-of-bounds read/write in Eclipse Mosquitto

Published Nov 18, 2026 CVSS 3.1 · 9.8 Critical EPSS n/a KEV · Not listed
Description
In Eclipse Mosquitto versions 2.1 through 2.1.2, a listener configured with `protocol websockets` mishandles empty WebSocket data frames. `net__read_ws()` in `lib/net_ws.c` returns the number of framing bytes consumed (the 4 masking-key bytes) for a data frame with a zero-length payload, without writing any bytes to the caller’s buffer. The MQTT packet reader in `packet__read_single()` (`lib/packet_mosq.c`) trusts that return value as a payload byte count. A remote client can therefore advance the read position over an uninitialised heap allocation, causing the broker to process and forward uninitialised heap memory (information disclosure, including heap and libc pointers), and can underflow the unsigned `to_process` counter so that subsequent attacker-controlled frame data is written past the end of the allocation (heap out-of-bounds write). The out-of-bounds write is reachable from the CONNECT packet before any authentication check, so an unauthenticated client can corrupt the heap and crash the broker even when `allow_anonymous false` is set. Combining the disclosure and the write allows remote code execution as the broker’s user by any client able to establish a session.

Analysis

AI-generated

Technical impact

Eclipse Mosquitto versions 2.1 through 2.1.2 allow an unauthenticated client to send empty WebSocket frames that are incorrectly interpreted as zero‑length payloads. The MQTT packet reader then trusts this to calculate how many bytes to read, which causes it to advance the read pointer over an uninitialized heap allocation, leak heap and libc addresses, and underflow a counter so that subsequent frames overflow the heap. These read and write errors are reachable before any authentication, allowing a remote client to corrupt the broker’s memory and cause a crash or gain execution as the broker user.

Affected Systems

The flaw exists in the Eclipse Mosquitto broker owned by the Eclipse Foundation, specifically in all releases from 2.1.0 up through 2.1.2 inclusive. A listener configured with protocol websockets is required for the issue to be triggered.

Risk and Exploitability

The CVSS v3.1 score of 9.8 classifies this vulnerability as Critical. The EPSS score is not available, so the current exploitation probability cannot be quantified, and the vulnerability has not been catalogued in CISA’s KEV. An unauthenticated client can reach the vulnerable code over a WebSocket connection before user authentication, meaning the attack can be performed remotely from the public internet. The combined read/write flaw can disclose privileged pointers and then allow an attacker to execute arbitrary code under the broker’s operating system user.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Eclipse Mosquitto to version 2.1.3 or later, when the issue is patched.
  • If an upgrade is not immediately possible, disable the websockets listener (remove or comment out any listener block with protocol websockets) to prevent the vulnerable code path from being exercised.
  • Restrict inbound WebSocket connections on the broker’s port using a firewall or network ACL to limit exposure.

Generated by OpenCVE AI on November 18, 2026 at 13:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Eclipse
Eclipse eclipse Mosquitto
Vendors & Products Eclipse
Eclipse eclipse Mosquitto
Type Values Removed Values Added
Description In Eclipse Mosquitto versions 2.1 through 2.1.2, a listener configured with `protocol websockets` mishandles empty WebSocket data frames. `net__read_ws()` in `lib/net_ws.c` returns the number of framing bytes consumed (the 4 masking-key bytes) for a data frame with a zero-length payload, without writing any bytes to the caller’s buffer. The MQTT packet reader in `packet__read_single()` (`lib/packet_mosq.c`) trusts that return value as a payload byte count. A remote client can therefore advance the read position over an uninitialised heap allocation, causing the broker to process and forward uninitialised heap memory (information disclosure, including heap and libc pointers), and can underflow the unsigned `to_process` counter so that subsequent attacker-controlled frame data is written past the end of the allocation (heap out-of-bounds write). The out-of-bounds write is reachable from the CONNECT packet before any authentication check, so an unauthenticated client can corrupt the heap and crash the broker even when `allow_anonymous false` is set. Combining the disclosure and the write allows remote code execution as the broker’s user by any client able to establish a session.
Title Remote heap out-of-bounds read/write in Eclipse Mosquitto
Weaknesses CWE-191
CWE-787
CWE-908
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-191

    Integer Underflow (Wrap or Wraparound)

  • CWE-787

    Out-of-bounds Write

  • CWE-908

    Use of Uninitialized Resource

Sources

Status
PUBLISHED
Assigner
eclipse
Published
Updated
Nov 18, 2026, 11:07 AM
Reserved
Oct 14, 2026, 8:51 AM
Status
Received
Published
Nov 18, 2026, 11:17 AM
Modified
Nov 18, 2026, 11:17 AM