CVE-2023-33659
📋 TL;DR
A heap buffer overflow vulnerability in NanoMQ 0.17.2 allows attackers to trigger denial of service by exploiting the nmq_subinfo_decode() function. This affects systems running vulnerable versions of NanoMQ, potentially disrupting MQTT messaging services.
💻 Affected Systems
- NanoMQ
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, though CVSS suggests DoS is primary risk
Likely Case
Denial of service causing NanoMQ service crashes and disruption of MQTT messaging
If Mitigated
Service disruption limited to NanoMQ instance without affecting underlying OS
🎯 Exploit Status
Exploitation requires sending specially crafted MQTT packets to trigger the buffer overflow
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Check GitHub commits for fixes after 0.17.2
Vendor Advisory: https://github.com/emqx/nanomq/issues/1154
Restart Required: Yes
Instructions:
1. Update NanoMQ to latest patched version 2. Restart NanoMQ service 3. Verify fix with version check
🔧 Temporary Workarounds
Network segmentation
linuxRestrict access to NanoMQ MQTT port (default 1883) to trusted clients only
iptables -A INPUT -p tcp --dport 1883 -s trusted_network -j ACCEPT
iptables -A INPUT -p tcp --dport 1883 -j DROP
🧯 If You Can't Patch
- Implement strict network access controls to limit who can connect to NanoMQ
- Deploy intrusion detection systems to monitor for abnormal MQTT traffic patterns
🔍 How to Verify
Check if Vulnerable:
Check NanoMQ version: nanomq --version or examine installed package
Check Version:
nanomq --version
Verify Fix Applied:
Confirm version is newer than 0.17.2 and test with normal MQTT operations
📡 Detection & Monitoring
Log Indicators:
- NanoMQ crash logs
- Segmentation fault errors
- Abnormal termination
Network Indicators:
- Unusual MQTT subscription packets
- Multiple connection attempts with malformed data
SIEM Query:
source="nanomq.log" AND ("segmentation fault" OR "crash" OR "buffer overflow")
🔗 References
- https://github.com/emqx/nanomq
- https://github.com/emqx/nanomq/issues/1154
- https://github.com/nanomq/NanoNNG/pull/509/commits/6815c4036a2344865da393803ecdb7af27d8bde1
- https://github.com/emqx/nanomq
- https://github.com/emqx/nanomq/issues/1154
- https://github.com/nanomq/NanoNNG/pull/509/commits/6815c4036a2344865da393803ecdb7af27d8bde1