CVE-2023-27991
📋 TL;DR
This is a post-authentication command injection vulnerability in Zyxel firewall CLI commands that allows authenticated attackers to execute arbitrary operating system commands remotely. It affects multiple Zyxel firewall product lines including ATP, USG FLEX, USG20(W)-VPN, and VPN series. Attackers with valid credentials can potentially gain full system control.
💻 Affected Systems
- Zyxel ATP series
- Zyxel USG FLEX series
- Zyxel USG FLEX 50(W)
- Zyxel USG20(W)-VPN
- Zyxel VPN series
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of affected firewall devices, allowing attackers to pivot to internal networks, steal credentials, install persistent backdoors, or disrupt network operations.
Likely Case
Privilege escalation leading to unauthorized access to sensitive network configurations, credential harvesting, or lateral movement within the network.
If Mitigated
Limited impact if strong authentication controls, network segmentation, and least privilege access are implemented, though authenticated users could still exploit the vulnerability.
🎯 Exploit Status
Exploitation requires valid credentials but command injection vulnerabilities are typically easy to weaponize once discovered.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Versions after those listed in affected versions
Restart Required: Yes
Instructions:
1. Check current firmware version. 2. Download latest firmware from Zyxel support portal. 3. Backup configuration. 4. Apply firmware update via web interface or CLI. 5. Reboot device. 6. Verify update completed successfully.
🔧 Temporary Workarounds
Restrict CLI Access
allLimit CLI access to only trusted administrators and implement strong authentication controls.
Network Segmentation
allIsolate affected devices in separate network segments to limit potential lateral movement.
🧯 If You Can't Patch
- Implement strict access controls and multi-factor authentication for all administrative accounts
- Monitor and audit CLI command usage for suspicious activity
🔍 How to Verify
Check if Vulnerable:
Check firmware version via web interface (System > Maintenance > Firmware) or CLI (show version command)
Check Version:
show version
Verify Fix Applied:
Verify firmware version is updated beyond affected ranges and test CLI functionality
📡 Detection & Monitoring
Log Indicators:
- Unusual CLI command patterns
- Multiple failed authentication attempts followed by successful login
- Unexpected system command execution
Network Indicators:
- Unusual outbound connections from firewall devices
- Traffic patterns indicating lateral movement
SIEM Query:
source="zyxel_firewall" AND (event_type="cli_command" AND command="*;*" OR command="*|*" OR command="*`*" OR command="*$(*)")
🔗 References
- https://www.zyxel.com/global/en/support/security-advisories/zyxel-security-advisory-for-xss-vulnerability-and-post-authentication-command-injection-vulnerability-in-firewalls
- https://www.zyxel.com/global/en/support/security-advisories/zyxel-security-advisory-for-xss-vulnerability-and-post-authentication-command-injection-vulnerability-in-firewalls