CVE-2020-15166
📋 TL;DR
CVE-2020-15166 is a denial-of-service vulnerability in ZeroMQ where attackers can disrupt message delivery to legitimate clients by connecting raw TCP sockets to CURVE/ZAP-protected endpoints. Users with TCP transport public endpoints are affected, even when CURVE/ZAP authentication is enabled. This prevents server applications from receiving messages despite successful handshakes.
💻 Affected Systems
- ZeroMQ (libzmq)
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Libzmq by Zeromq
⚠️ Risk & Real-World Impact
Worst Case
Complete disruption of message processing for legitimate clients, causing service unavailability and potential business impact for applications relying on ZeroMQ communication.
Likely Case
Intermittent or complete denial of service for ZeroMQ-based applications, leading to degraded performance or service outages.
If Mitigated
Minimal impact if systems are patched or workarounds are implemented; normal message flow continues uninterrupted.
🎯 Exploit Status
No public exploit code identified, but the vulnerability is straightforward to exploit given its nature.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 4.3.3
Vendor Advisory: https://github.com/zeromq/libzmq/security/advisories/GHSA-25wp-cf8g-938m
Restart Required: Yes
Instructions:
1. Update ZeroMQ to version 4.3.3 or later. 2. For package managers: Use 'apt-get upgrade libzmq5' (Debian/Ubuntu), 'yum update zeromq' (RHEL/CentOS), or equivalent. 3. For source builds: Download from zeromq.org and compile. 4. Restart all ZeroMQ-dependent services.
🔧 Temporary Workarounds
Disable TCP endpoints
allTemporarily disable TCP transport endpoints if not required, or switch to other transports like IPC or inproc.
Modify application configuration to remove TCP bind/connect endpoints
Network segmentation
linuxRestrict access to ZeroMQ TCP endpoints using firewall rules to trusted sources only.
iptables -A INPUT -p tcp --dport [ZMQ_PORT] -s [TRUSTED_IP] -j ACCEPT
iptables -A INPUT -p tcp --dport [ZMQ_PORT] -j DROP
🧯 If You Can't Patch
- Implement strict network access controls to limit who can connect to ZeroMQ TCP endpoints.
- Monitor for unusual connection patterns or failed message deliveries that might indicate exploitation attempts.
🔍 How to Verify
Check if Vulnerable:
Check ZeroMQ version: 'zmq --version' or examine installed package version. If version is <4.3.3 and TCP endpoints with CURVE/ZAP are used, system is vulnerable.
Check Version:
zmq --version 2>&1 | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' || dpkg -l | grep libzmq || rpm -q zeromq
Verify Fix Applied:
Confirm version is ≥4.3.3 and test message delivery between clients and server with CURVE/ZAP enabled TCP endpoints.
📡 Detection & Monitoring
Log Indicators:
- Increased failed message deliveries
- Unusual TCP connection patterns to ZeroMQ ports
- Handshake successes followed by message processing failures
Network Indicators:
- Multiple TCP connections to ZeroMQ ports from unexpected sources
- Connection attempts without proper CURVE/ZAP authentication flow
SIEM Query:
source="*zmq*" AND (event="connection_failed" OR event="message_dropped") | stats count by src_ip
🔗 References
- https://github.com/zeromq/libzmq/pull/3913
- https://github.com/zeromq/libzmq/pull/3973
- https://github.com/zeromq/libzmq/security/advisories/GHSA-25wp-cf8g-938m
- https://lists.debian.org/debian-lts-announce/2020/11/msg00017.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BZ5IMNQXDB52JFBXHFLK4AHVORFELNNG/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YFW2ZELCCPS4VLU4OSJOH5YL6KFKTFYW/
- https://security.gentoo.org/glsa/202009-12
- https://github.com/zeromq/libzmq/pull/3913
- https://github.com/zeromq/libzmq/pull/3973
- https://github.com/zeromq/libzmq/security/advisories/GHSA-25wp-cf8g-938m
- https://lists.debian.org/debian-lts-announce/2020/11/msg00017.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BZ5IMNQXDB52JFBXHFLK4AHVORFELNNG/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YFW2ZELCCPS4VLU4OSJOH5YL6KFKTFYW/
- https://security.gentoo.org/glsa/202009-12