CVE-2021-33514
📋 TL;DR
This vulnerability allows unauthenticated attackers to execute arbitrary operating system commands on affected NETGEAR smart switches by injecting malicious commands through the User-Agent header in HTTP requests to a vulnerable CGI application. The attack exploits improper input sanitization in the libsal library and affects multiple NETGEAR smart switch models.
💻 Affected Systems
- NETGEAR GC108P
- NETGEAR GC108PP
- NETGEAR GS108Tv3
- NETGEAR GS110TPPv1
- NETGEAR GS110TPv3
- NETGEAR GS110TUPv1
- NETGEAR GS710TUPv1
- NETGEAR GS716TP
- NETGEAR GS716TPP
- NETGEAR GS724TPPv1
- NETGEAR GS724TPv2
- NETGEAR GS728TPPv2
- NETGEAR GS728TPv2
- NETGEAR GS752TPPv1
- NETGEAR GS752TPv2
- NETGEAR MS510TXM
- NETGEAR MS510TXUP
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of affected switches allowing attackers to install persistent backdoors, pivot to internal networks, disrupt network operations, or use devices as part of botnets.
Likely Case
Attackers gain remote code execution to reconfigure switches, intercept network traffic, or disrupt network connectivity.
If Mitigated
With proper network segmentation and access controls, impact limited to isolated network segments.
🎯 Exploit Status
Public proof-of-concept demonstrates exploitation via HTTP request with malicious User-Agent header to setup.cgi endpoint. No authentication required.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: GC108P/GC108PP: 1.0.7.3, GS108Tv3/GS110TPPv1/GS110TPv3: 7.0.6.3, GS110TUPv1/GS710TUPv1: 1.0.4.3, GS716TP/GS716TPP: 1.0.2.3, GS724TPPv1/GS724TPv2: 2.0.4.3, GS728TPPv2/GS728TPv2/GS752TPPv1/GS752TPv2: 6.0.6.3, MS510TXM/MS510TXUP: 1.0.2.3
Vendor Advisory: https://kb.netgear.com/000063641/Security-Advisory-for-Pre-Authentication-Command-Injection-Vulnerability-on-Some-Smart-Switches-PSV-2021-0071
Restart Required: Yes
Instructions:
1. Download firmware update from NETGEAR support site. 2. Log into switch web interface. 3. Navigate to Maintenance > Firmware Upgrade. 4. Upload firmware file. 5. Apply update and wait for automatic reboot.
🔧 Temporary Workarounds
Network Segmentation
allIsolate affected switches from untrusted networks and restrict access to management interfaces.
Access Control Lists
linuxImplement firewall rules to restrict HTTP/HTTPS access to switch management interfaces to trusted IP addresses only.
iptables -A INPUT -p tcp --dport 80 -s trusted_ip -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -s trusted_ip -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP
iptables -A INPUT -p tcp --dport 443 -j DROP
🧯 If You Can't Patch
- Disable web management interface if not required
- Place switches behind VPN or jump host with strict access controls
🔍 How to Verify
Check if Vulnerable:
Check firmware version via web interface (System > Information) or SSH (show version) and compare with patched versions listed in advisory.
Check Version:
ssh admin@switch_ip 'show version' or check web interface System > Information page
Verify Fix Applied:
Verify firmware version matches or exceeds patched version. Test with known exploit payloads to confirm they no longer work.
📡 Detection & Monitoring
Log Indicators:
- HTTP requests to /setup.cgi with unusual User-Agent strings containing shell metacharacters
- Multiple failed login attempts followed by successful command execution patterns
- Unusual process execution in switch logs
Network Indicators:
- HTTP requests with User-Agent containing ;, $, |, &, or other shell metacharacters
- Rapid sequential requests to setup.cgi endpoint
- Outbound connections from switches to unexpected destinations
SIEM Query:
source="switch_logs" AND (uri="/setup.cgi" AND user_agent="*;*" OR user_agent="*$*" OR user_agent="*|*" OR user_agent="*&*")
🔗 References
- https://gynvael.coldwind.pl/?lang=en&id=733
- https://kb.netgear.com/000063641/Security-Advisory-for-Pre-Authentication-Command-Injection-Vulnerability-on-Some-Smart-Switches-PSV-2021-0071
- https://gynvael.coldwind.pl/?lang=en&id=733
- https://kb.netgear.com/000063641/Security-Advisory-for-Pre-Authentication-Command-Injection-Vulnerability-on-Some-Smart-Switches-PSV-2021-0071