CVE-2022-22301

7.8 HIGH

📋 TL;DR

This vulnerability allows authenticated attackers to execute arbitrary operating system commands on FortiAP-C devices by injecting malicious arguments into CLI commands. It affects FortiAP-C console versions 5.4.0 through 5.4.3 and 5.2.0 through 5.2.1. Attackers must have valid credentials to exploit this command injection flaw.

💻 Affected Systems

Products:
  • FortiAP-C Console
Versions: 5.4.0 through 5.4.3, 5.2.0 through 5.2.1
Operating Systems: FortiOS-based systems
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated access to the CLI interface. All configurations within affected versions are vulnerable.

📦 What is this software?

⚠️ 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 network operations.

🟠

Likely Case

Unauthorized command execution leading to configuration changes, credential harvesting, or lateral movement within the network.

🟢

If Mitigated

Limited impact if proper network segmentation, least privilege access, and monitoring are implemented.

🌐 Internet-Facing: MEDIUM - While authentication is required, exposed management interfaces could be targeted by credential stuffing or if default credentials remain unchanged.
🏢 Internal Only: HIGH - Authenticated internal users or compromised accounts could exploit this to gain elevated privileges and move laterally.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW - Simple command injection once authenticated.

Exploitation requires valid credentials. The vulnerability is in how CLI arguments are processed, allowing command injection.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FortiAP-C 5.4.4 and later, 5.2.2 and later

Vendor Advisory: https://fortiguard.com/psirt/FG-IR-21-227

Restart Required: Yes

Instructions:

1. Download FortiAP-C firmware version 5.4.4 or later (or 5.2.2 or later) from Fortinet support portal. 2. Backup current configuration. 3. Upload and install the new firmware via web interface or CLI. 4. Reboot the device. 5. Verify the new version is running.

🔧 Temporary Workarounds

Restrict CLI Access

all

Limit CLI access to trusted administrative accounts only and implement strong authentication controls.

Network Segmentation

all

Isolate FortiAP-C management interfaces from untrusted networks and implement strict firewall rules.

🧯 If You Can't Patch

  • Implement strict access controls and monitor all CLI sessions for suspicious activity.
  • Deploy network-based intrusion detection systems to monitor for command injection patterns in management traffic.

🔍 How to Verify

Check if Vulnerable:

Check FortiAP-C firmware version via CLI: 'get system status' or web interface System > Dashboard.

Check Version:

get system status | grep Version

Verify Fix Applied:

Verify firmware version is 5.4.4+ or 5.2.2+ using 'get system status' command.

📡 Detection & Monitoring

Log Indicators:

  • Unusual CLI command patterns
  • Multiple failed authentication attempts followed by successful login
  • Commands with special characters or shell metacharacters

Network Indicators:

  • Unusual outbound connections from FortiAP-C devices
  • Traffic patterns inconsistent with normal management operations

SIEM Query:

source="fortiap" AND (command="*;*" OR command="*|*" OR command="*`*" OR command="*$(*" OR command="*&*" OR command="*>" OR command="*<*")

🔗 References

📤 Share & Export