CVE-2024-48077
📋 TL;DR
This vulnerability in NanoMQ allows attackers to cause a denial of service by sending crafted requests that cause the recv-q queue to fill up, leading to deadlock. Any system running the vulnerable NanoMQ broker version is affected, potentially disrupting MQTT messaging services.
💻 Affected Systems
- NanoMQ
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete service outage of the NanoMQ broker, disrupting all MQTT messaging and potentially affecting dependent applications and IoT devices.
Likely Case
Service degradation or complete unavailability of the NanoMQ broker, requiring manual restart to restore functionality.
If Mitigated
Limited impact if proper network segmentation and rate limiting are in place, though service disruption may still occur.
🎯 Exploit Status
The vulnerability requires sending crafted requests but does not require authentication, making exploitation straightforward.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v0.22.8 or later
Vendor Advisory: https://github.com/nanomq/nanomq
Restart Required: Yes
Instructions:
1. Stop the NanoMQ service. 2. Update to v0.22.8 or later using your package manager or by downloading from GitHub. 3. Restart the NanoMQ service.
🔧 Temporary Workarounds
Rate Limiting
linuxImplement network-level rate limiting to restrict the number of requests per source IP.
iptables -A INPUT -p tcp --dport 1883 -m limit --limit 100/minute --limit-burst 200 -j ACCEPT
iptables -A INPUT -p tcp --dport 1883 -j DROP
Network Segmentation
linuxRestrict access to NanoMQ ports to trusted networks only.
iptables -A INPUT -p tcp --dport 1883 -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 1883 -j DROP
🧯 If You Can't Patch
- Implement strict network access controls to limit which systems can connect to NanoMQ.
- Deploy monitoring to detect abnormal traffic patterns and restart the service if deadlock occurs.
🔍 How to Verify
Check if Vulnerable:
Check the NanoMQ version: nanomq --version. If it shows v0.22.7, the system is vulnerable.
Check Version:
nanomq --version
Verify Fix Applied:
After updating, verify the version shows v0.22.8 or later and test that the broker continues to function under normal load.
📡 Detection & Monitoring
Log Indicators:
- Increasing recv-q queue size
- Service becoming unresponsive
- Connection timeouts
- High CPU usage followed by service hang
Network Indicators:
- Abnormal spike in incoming connections to port 1883
- Repeated connection attempts from single sources
SIEM Query:
source="nanomq.log" AND ("recv-q" OR "deadlock" OR "unresponsive")