Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/googlesky/cve-2026-110486
IoT SecurityVulnerability AnalysisExploitationWeb Application ExploitationFuzzingNetwork SecurityPapers & Research
GitHubgooglesky/cve-2026-110486

CVE-2026-110486

Proof-of-concept and ASan differential lab for CVE-2026-110486, an unauthenticated Mosquitto WebSocket zero-length frame bug causing MQTT parser desync and heap over-read.

View Repository
4 days agoNot yet reviewed
Share

CVE-2026-110486 — Eclipse Mosquitto: empty WebSocket data frame desynchronises the MQTT parser before authentication

License: MIT Research status: validated

CVECVE-2026-110486
ComponentEclipse Mosquitto — lib/net_ws.c::net__read_ws(), builtin websockets implementation
Affected2.1 through 2.1.2
Fixed in2.1.3 — genuine vendor fix, commit 021b063d
CWECWE-125 (Out-of-bounds Read), CWE-787 (Out-of-bounds Write)
ImpactAn unauthenticated WebSocket client can make the broker parse bytes that were never read from the wire: uninitialised heap contents enter CONNECT handling, enabling information disclosure and, with the right heap layout, to_process underflow and an out-of-bounds write before authentication
VectorNetwork — a WebSocket connection to a protocol websockets listener, one zero-length data frame
Triggera masked WebSocket data frame with payload length 0

For a zero-length data frame, net__read_ws() consumed the four masking-key bytes, set len to 4, and never wrote to the caller's buffer:

// v2.1.2, lib/net_ws.c (~L302, ~L344)
len = net__read(mosq, buf, count);     // skipped when payloadlen == 0
...
if (mosq->wsd.pos == (ssize_t)mosq->wsd.payloadlen) {  // 0 == 0
    /* data frames have no out_packet, so none of the branches reset len */
}
return len;                            // 4 — but buf is untouched

packet__read_single() treats that return value as four bytes of MQTT data. The vendor fix (2.1.3) introduces a separate mqtt_len, initialised to -1, and returns -1/EAGAIN for an empty frame after reading the mask.

The laboratory builds both upstream tags with ASan+UBSan and drives the real broker over its WebSocket listener. During the handshake the broker zeroes the packet buffer, so the phantom read is deterministically four zero bytes: the vulnerable broker logs First packet not CONNECT (00) and drops the client, while the fixed broker ignores the frame and keeps the session alive.


1. Root cause

The function conflated "bytes consumed from the socket" (frame header and masking key) with "bytes delivered to the MQTT reader". For an empty data frame those quantities differ by four. Because the MQTT reader then believes a packet header has arrived, parser state advances over memory the broker never filled; with controlled follow-up frames the unsigned to_process counter can underflow and subsequent writes land outside the payload allocation. The fix returns a distinct value that means "no application data yet" for empty frames.

2. Reproduction environment

serviceimagerole
mosq-vulncve-2026-110486:vulnmosquitto v2.1.2, ASan+UBSan
mosq-fixedcve-2026-110486:fixedmosquitto v2.1.3, ASan+UBSan, genuine vendor fix
poccve-2026-110486-poc:localstdlib-only Python driver

Both sides share the same config (plain WS listener on 8080, MQTT on 1883, anonymous allowed), build flags and supervisor. The supervisor runs the broker as a child and exposes /status (exit code, sanitizer flag, broker log) and POST /restart so each probe case starts from a clean log.

3. Running the environment

./run-lab.sh build     # builds 2.1.2 and 2.1.3 with ASan+UBSan
./run-lab.sh up        # cve110486lab network: mosq-vuln / mosq-fixed
./run-lab.sh sweep     # check / exploit / probe / mitigation on both sides
./run-lab.sh down

4. The PoC

poc/poc.py (stdlib only) performs the WebSocket handshake, sends one zero-length masked data frame and reads the broker log:

  • check — the First packet not CONNECT (00) marker means the broker parsed four bytes that were never delivered; exit 1 vulnerable, 0 safe, 3 no worker, 2 unreachable.
  • exploit — narrated stages with the exact broker log lines.
  • probe — empty data frame vs ping frame vs real data frame controls.
  • mitigation — 2.1.3 / commit 021b063d.

A standalone full-chain exploit ships at exploit/exploit.py:

python3 exploit/exploit.py --host=mosq-vuln
# exit 1 on confirmed parser desync, 0 on a safe target

5. Expected results

framemosq-vuln (2.1.2)mosq-fixed (2.1.3)
empty data frame"First packet not CONNECT (00)", client droppedno phantom command; session stays alive until the client closes
ping frame (control)no phantom commandno phantom command
real data frame (control)normal MQTT processingnormal MQTT processing

Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt, evidence/probe-*-run.txt, evidence/mitigation-*-run.txt, evidence/exploit-standalone-run.txt, evidence/versions.txt, evidence/0day-sweep.txt.

6. Environment preconditions

  • A listener with protocol websockets using mosquitto's builtin implementation (WITH_WEBSOCKETS_BUILTIN=ON).
  • Podman (or Docker); bounded containers on the isolated cve110486lab network.
  • The broker zeroes in_packet.packet_buffer during the handshake, which makes the phantom bytes deterministic (zero) in this lab.

7. Additional findings (0-day sweep on the fixed line)

The probe matrix on 2.1.3 shows no phantom command for the empty frame; ping and data-frame controls stay clean on both builds. The advisory's downstream heap overflow depends on attacker-shaped heap state — a particular uninitialised prefix declaring a MQTT remaining length plus a follow-up frame — so this lab proves the deterministic root cause (the phantom four-byte read before authentication) rather than asserting one specific heap layout. No bypass of the 2.1.3 guard was found.

8. Repository layout

README.md             this write-up
run-lab.sh            environment driver (build / up / sweep / down)
Makefile              convenience targets
poc/poc.py            the PoC (check / exploit / probe / mitigation)
exploit/exploit.py    standalone full-chain exploit
lab/lab.Dockerfile    ASan+UBSan build of both upstream tags
lab/mosquitto.conf    websockets listener configuration
lab/supervisord.py    child-process broker supervisor + /status
evidence/             captured runs of every mode on both sides
TRACKING.md           excluded (working record)

9. References

  • CVE record — https://www.cve.org/CVERecord?id=CVE-2026-110486
  • GitHub advisory — https://github.com/eclipse-mosquitto/mosquitto/security/advisories/GHSA-6j8m-r32v-4h38
  • Vendor fix commit — https://github.com/eclipse-mosquitto/mosquitto/commit/021b063df9e68608a5d58d95031b0073a39d2c90
  • Fixed release — https://github.com/eclipse-mosquitto/mosquitto/releases/tag/v2.1.3
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    885
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    796
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    629
  • 4

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    458
  • 5

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    433
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    385

Explore all tools

Browse our collection of tools

View all tools →