Back to Intelligence

CVE-2026-114550: libwebsockets MQTT PUBACK Out-of-Bounds Write — Detection and Mitigation Guide

SA
Security Arsenal Team
October 27, 2026
7 min read

The Zero Day Initiative has published ZDI-26-792, detailing a critical vulnerability in the ubiquitous libwebsockets library. Tracked as CVE-2026-114550, this flaw resides in the MQTT protocol implementation—specifically within PUBACK packet handling—and enables remote attackers to execute arbitrary code without authentication.

With a CVSS score of 8.1 (High), this vulnerability poses an immediate risk to any application, embedded device, or IoT gateway utilizing libwebsockets for MQTT broker or client functionality. Given the library's prevalence in constrained environments—from industrial sensors to enterprise messaging infrastructure—security teams must treat this as a priority-one exposure requiring immediate inventory and mitigation.

Technical Analysis

Vulnerability Mechanics

The flaw manifests as an out-of-bounds write (CWE-787) during the parsing of MQTT PUBACK (Publish Acknowledgment) packets. In the MQTT protocol, PUBACK messages are Quality of Service (QoS) level 1 acknowledgments sent by receivers to confirm message delivery.

The vulnerability occurs when libwebsockets processes a maliciously crafted PUBACK packet containing manipulated length fields or reason codes. The parser fails to properly validate buffer boundaries before writing packet data to memory, allowing an attacker to corrupt adjacent memory structures. This memory corruption can be leveraged to overwrite function pointers or inject shellcode, ultimately yielding arbitrary code execution within the context of the process running libwebsockets.

Critically, authentication is not required to trigger this vulnerability. An attacker needs only network connectivity to the target service—typically TCP ports 1883 (MQTT) or 8883 (MQTT over TLS)—to deliver the malicious PUBACK packet.

Affected Deployments

While the ZDI advisory references "affected installations of libwebsockets" without specifying exact version numbers, defenders should assume all versions prior to the upcoming patch are vulnerable. The library is embedded in:

  • IoT and Embedded Devices: Firmware utilizing libwebsockets for MQTT telemetry
  • Industrial Control Systems (ICS): Protocol gateways and data concentrators
  • Enterprise Messaging: Custom applications leveraging libwebsockets for lightweight pub/sub
  • Network Appliances: Routers, firewalls, and monitoring tools with MQTT interfaces

Exploitation Status

As of this publication, no public proof-of-concept exploit code has been released, and CVE-2026-114550 is not yet listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. However, the unauthenticated nature of the flaw and the ubiquity of MQTT in internet-facing IoT deployments suggest weaponization attempts are imminent. Organizations should operate under the assumption that exploit code will surface within days, not weeks.

Detection & Response

Detecting exploitation of CVE-2026-114550 requires monitoring for both the network-level delivery of malformed MQTT packets and the host-level behavioral anomalies following successful memory corruption.

Network Detection

Monitor for MQTT packets with anomalous PUBACK lengths or unexpected PUBACK floods, which may indicate fuzzing or exploitation attempts. Additionally, watch for libwebsockets processes crashing and restarting—a common indicator of failed exploitation attempts triggering segmentation faults.

Host-Based Detection

Successful exploitation will likely result in the libwebsockets process spawning unexpected child processes (command shells, downloaders) or making unexpected outbound network connections as the attacker establishes persistence.

YAML
---
title: MQTT PUBACK Flood or Anomalous Packet Detection
id: 3f8a9c2e-7b1d-4e5f-9a8c-2d4e6f8a1b3c
status: experimental
description: Detects high volume of MQTT PUBACK packets or oversized PUBACK messages potentially indicating exploitation attempts against CVE-2026-114550
references:
  - http://www.zerodayinitiative.com/advisories/ZDI-26-792/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.initial_access
  - attack.t1190
logsource:
  category: network_connection
  product: zeek
detection:
  selection:
    id.resp_p: [1883, 8883]
    mqtt.msg_type: 'PUBACK'
  condition: selection
falsepositives:
  - High-volume legitimate MQTT QoS 1 traffic during bulk message processing
level: medium
---
title: libwebsockets Process Crash and Restart
id: 7b2c4d6e-9f1a-3b5c-8d2e-4f6a8c1e3b5d
status: experimental
description: Detects abnormal termination and restart of libwebsockets processes, potentially indicating failed exploitation of CVE-2026-114550 causing segmentation faults
references:
  - http://www.zerodayinitiative.com/advisories/ZDI-26-792/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.defense_evasion
  - attack.t1036
logsource:
  category: process_creation
  product: linux
detection:
  selection:
    Image|contains: 'libwebsockets'
  condition: selection
falsepositives:
  - Normal service restarts
  - Container orchestration health checks
level: low
---
title: libwebsockets Spawning Suspicious Child Processes
id: 9d4e6f8a-1c3b-5d7e-9f2a-4c6e8a1c3e5f
status: experimental
description: Detects libwebsockets processes spawning command shells or scripting engines, indicative of successful remote code execution following CVE-2026-114550 exploitation
references:
  - http://www.zerodayinitiative.com/advisories/ZDI-26-792/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.execution
  - attack.t1059
logsource:
  category: process_creation
  product: linux
detection:
  selection:
    ParentImage|contains: 'libwebsockets'
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/python'
      - '/perl'
      - '/curl'
      - '/wget'
  condition: selection
falsepositives:
  - Legitimate administrative scripts initiated by the application
level: high
KQL — Microsoft Sentinel / Defender
// Hunt for suspicious child processes spawned by libwebsockets
// Requires process command-line auditing via Sysmon for Linux, auditd, or MDE
DeviceProcessEvents
| where TimeGenerated > ago(24h)
| where InitiatingProcessFileName contains "libwebsockets"
| where FileName in ("sh", "bash", "dash", "zsh", "python", "perl", "curl", "wget", "nc", "netcat", "powershell")
| project TimeGenerated, DeviceName, InitiatingProcessFileName, FileName, ProcessCommandLine, InitiatingProcessCommandLine
| order by TimeGenerated desc
VQL — Velociraptor
-- Hunt for libwebsockets processes with suspicious child processes or network connections
SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ 'libwebsockets'
   OR Exe =~ 'libwebsockets'

// Additionally hunt for established outbound connections from these processes
SELECT Pid, Name, RemoteAddress, RemotePort, State
FROM netstat()
WHERE Name =~ 'libwebsockets'
   AND State == 'ESTABLISHED'
Bash / Shell
#!/bin/bash
# CVE-2026-114550 Verification and Hardening Script
# Run with root privileges

echo "[+] Checking for libwebsockets installation and version"

# Check for libwebsockets shared library presence
LIB_PATH=$(ldconfig -p | grep libwebsockets | head -1 | awk '{print $NF}')
if [ -n "$LIB_PATH" ]; then
    echo "[!] libwebsockets library found at: $LIB_PATH"
    # Extract version if possible
    if [ -f "$LIB_PATH" ]; then
        VERSION=$(strings "$LIB_PATH" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -1)
        echo "[!] Detected version: ${VERSION:-Unknown}"
        echo "[!] IMMEDIATE ACTION REQUIRED: Update to patched version or recompile from fixed source"
    fi
else
    echo "[+] libwebsockets shared library not found in ldconfig cache"
fi

# Check for statically linked binaries (common in embedded/IoT)
echo "[+] Checking for statically linked libwebsockets in running processes"
ps aux | grep -i mqtt | grep -v grep | while read -r line; do
    echo "[!] MQTT-related process detected: $line"
    echo "    Review process for libwebsockets linkage (lsof or /proc/<pid>/maps)"
done

# Network exposure check
echo "[+] Checking for MQTT service exposure (ports 1883, 8883)"
if netstat -tuln 2>/dev/null | grep -E ':(1883|8883)' > /dev/null || ss -tuln 2>/dev/null | grep -E ':(1883|8883)' > /dev/null; then
    echo "[!] MQTT ports detected as listening"
    echo "[!] Recommend immediate network segmentation or ACL restriction until patch is applied"
    
    # Optional: Implement temporary iptables rate limiting
    echo "[+] To implement temporary rate limiting, run:"
    echo "    iptables -A INPUT -p tcp --dport 1883 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT"
    echo "    iptables -A INPUT -p tcp --dport 1883 -j DROP"
else
    echo "[+] No MQTT services detected on standard ports"
fi

echo "[+] Hardening recommendations:"
echo "    1. Compile libwebsockets with -D_LWS_WITH_MINIMAL_EXAMPLES=0 to remove unnecessary protocol handlers"
echo "    2. Disable MQTT support entirely if not required (-DLWS_WITH_MQTT=OFF)"
echo "    3. Implement network segmentation to restrict MQTT traffic to trusted subnets"
echo "    4. Monitor for libwebsockets process crashes and child process spawning"

Remediation

Immediate Actions

  1. Inventory and Triage: Identify all systems utilizing libwebsockets with MQTT enabled. Check embedded devices, container images, and custom applications. Statically linked binaries require source-level patching or vendor firmware updates.

  2. Network Segmentation: Until patches are applied, restrict access to MQTT ports (1883/TCP, 8883/TCP) via firewall ACLs. Limit connectivity to trusted broker IP addresses only.

  3. Vendor Coordination: Contact your software or hardware vendors immediately. For open-source deployments, monitor the libwebsockets GitHub repository for commit references to CVE-2026-114550.

Patch and Configuration

  • Official Fix: Apply the libwebsockets security patch immediately upon release. The fix will implement proper bounds checking in the MQTT PUBACK packet parsing routine.
  • Compile-Time Mitigation: If patching is delayed, consider recompiling libwebsockets with MQTT support disabled (-DLWS_WITH_MQTT=OFF) if business functionality permits.
  • Runtime Protections: Ensure libwebsockets processes run with minimal privileges (dedicated service account) and utilize mandatory access controls (SELinux, AppArmor) to contain potential exploitation.

Monitoring

Deploy the detection rules provided above to your SIEM and EDR platforms. Pay particular attention to:

  • Process crashes followed by restarts (exploitation attempts)
  • Unexpected child processes from libwebsockets binaries
  • Anomalous outbound connections from MQTT-handling processes

Given the unauthenticated nature of this vulnerability and the widespread deployment of libwebsockets in critical infrastructure, organizations should treat CVE-2026-114550 with the same urgency as a publicly exploited zero-day until patches are universally applied.

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.