CVE-2022-27482

7.8 HIGH

📋 TL;DR

This CVE describes an OS command injection vulnerability in Fortinet FortiADC that allows authenticated attackers to execute arbitrary shell commands with root privileges via CLI commands. The vulnerability affects multiple versions of FortiADC across several major releases. Attackers with CLI access can gain complete control of affected devices.

💻 Affected Systems

Products:
  • Fortinet FortiADC
Versions: 7.0.0-7.0.1, 6.2.0-6.2.2, 6.1.0-6.1.6, 6.0.x, 5.x.x
Operating Systems: FortiOS-based systems
Default Config Vulnerable: ⚠️ Yes
Notes: Requires CLI access (authenticated). All affected versions are vulnerable by default when CLI access is available.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the FortiADC device with root-level access, allowing attackers to steal credentials, intercept/modify traffic, pivot to internal networks, and establish persistent backdoors.

🟠

Likely Case

Privilege escalation from authenticated CLI user to root, enabling configuration changes, traffic interception, and lateral movement within the network.

🟢

If Mitigated

Limited impact if proper network segmentation, CLI access restrictions, and monitoring are in place, though the vulnerability still exists.

🌐 Internet-Facing: HIGH if management interface is exposed to internet, as authenticated attackers could gain root access remotely.
🏢 Internal Only: HIGH as authenticated internal users or compromised accounts can escalate to root privileges.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated CLI access. The vulnerability is in command parsing, making exploitation straightforward for attackers with CLI credentials.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 7.0.2, 6.2.3, 6.1.7, and later versions

Vendor Advisory: https://fortiguard.com/psirt/FG-IR-22-046

Restart Required: Yes

Instructions:

1. Download the patched firmware from Fortinet support portal. 2. Backup current configuration. 3. Upload and install the patched firmware. 4. Reboot the device. 5. Verify the new version is running.

🔧 Temporary Workarounds

Restrict CLI Access

all

Limit CLI access to trusted administrators only using access control lists and strong authentication.

config system admin
edit <admin_user>
set trusthost1 <trusted_ip> <mask>
end

Network Segmentation

all

Isolate FortiADC management interfaces from untrusted networks and implement strict firewall rules.

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate FortiADC management interfaces
  • Enforce multi-factor authentication and least privilege access for CLI users
  • Monitor CLI access logs for suspicious activity and command execution patterns

🔍 How to Verify

Check if Vulnerable:

Check FortiADC firmware version via CLI: 'get system status' and compare against affected versions.

Check Version:

get system status | grep Version

Verify Fix Applied:

After patching, verify firmware version is 7.0.2+, 6.2.3+, 6.1.7+, or later unaffected version.

📡 Detection & Monitoring

Log Indicators:

  • Unusual CLI command sequences
  • Multiple failed authentication attempts followed by successful login
  • Execution of system commands via CLI

Network Indicators:

  • Unexpected outbound connections from FortiADC management interface
  • Traffic patterns indicating command and control activity

SIEM Query:

source="fortiadc" AND (event_type="cli_command" AND command="*;*" OR command="*|*" OR command="*`*" OR command="*$(*")

🔗 References

📤 Share & Export