CVE-2024-40587
📋 TL;DR
This CVE describes an OS command injection vulnerability in Fortinet FortiVoice phone systems. Authenticated privileged attackers can execute arbitrary commands on affected devices via crafted CLI requests. Organizations running FortiVoice versions 7.0.0-7.0.4 or before 6.4.9 are affected.
💻 Affected Systems
- Fortinet FortiVoice
📦 What is this software?
Fortivoice by Fortinet
Fortivoice by Fortinet
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise allowing attacker to install persistent backdoors, exfiltrate sensitive data, pivot to other network segments, or disrupt telephony services.
Likely Case
Attacker gains shell access to execute commands, potentially stealing credentials, modifying configurations, or using the device as a foothold for lateral movement.
If Mitigated
Limited impact due to network segmentation, strong authentication controls, and monitoring preventing successful exploitation.
🎯 Exploit Status
Exploitation requires authenticated privileged access. The vulnerability is in CLI command handling.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: FortiVoice 7.0.5 or 6.4.9 and later
Vendor Advisory: https://fortiguard.fortinet.com/psirt/FG-IR-24-304
Restart Required: Yes
Instructions:
1. Backup current configuration. 2. Download appropriate firmware from Fortinet support portal. 3. Upload firmware via web interface or CLI. 4. Reboot device after installation. 5. Verify successful upgrade.
🔧 Temporary Workarounds
Restrict CLI Access
allLimit CLI access to trusted administrative accounts only and implement strong authentication.
Network Segmentation
allIsolate FortiVoice devices in separate VLANs with strict firewall rules limiting inbound/outbound traffic.
🧯 If You Can't Patch
- Implement strict network segmentation to isolate FortiVoice from critical systems
- Enforce multi-factor authentication and least privilege access for all administrative accounts
🔍 How to Verify
Check if Vulnerable:
Check FortiVoice firmware version via web interface (System > Dashboard) or CLI command 'get system status'
Check Version:
get system status | grep Version
Verify Fix Applied:
Verify firmware version is 7.0.5 or higher, or 6.4.9 or higher after patching
📡 Detection & Monitoring
Log Indicators:
- Unusual CLI command execution patterns
- Multiple failed authentication attempts followed by successful login
- Commands with shell metacharacters in CLI logs
Network Indicators:
- Unexpected outbound connections from FortiVoice device
- Traffic to unusual ports or IP addresses
SIEM Query:
source="fortivoice" AND (event_type="cli_command" AND command=*[;&|`]* OR auth_failure>3 AND auth_success=1)