CVE-2021-41022

7.8 HIGH

📋 TL;DR

This vulnerability allows attackers to execute privileged code or commands on Windows systems running vulnerable FortiSIEM agents via PowerShell scripts. It affects Fortinet FortiSIEM Windows Agent version 4.1.4 and below. Attackers could gain elevated privileges on compromised systems.

💻 Affected Systems

Products:
  • Fortinet FortiSIEM Windows Agent
Versions: 4.1.4 and below
Operating Systems: Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Windows agents; Linux agents are not vulnerable. Requires PowerShell execution capability.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with administrative privileges, enabling lateral movement, data exfiltration, ransomware deployment, and persistent backdoor installation.

🟠

Likely Case

Local privilege escalation allowing attackers to execute arbitrary commands with elevated privileges, potentially leading to credential theft, data access, and further system exploitation.

🟢

If Mitigated

Limited impact with proper privilege separation, PowerShell execution restrictions, and network segmentation in place.

🌐 Internet-Facing: MEDIUM - Requires initial access to the Windows system, but could be combined with other exploits for remote exploitation.
🏢 Internal Only: HIGH - Once an attacker gains initial access to a vulnerable system, privilege escalation is straightforward.

🎯 Exploit Status

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

Requires local access or ability to execute PowerShell scripts on target system. Privilege escalation is straightforward once initial access is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.1.5 or later

Vendor Advisory: https://fortiguard.com/advisory/FG-IR-21-176

Restart Required: Yes

Instructions:

1. Download FortiSIEM Windows Agent version 4.1.5 or later from Fortinet support portal. 2. Stop the FortiSIEM agent service. 3. Install the updated agent. 4. Restart the service and verify connectivity.

🔧 Temporary Workarounds

Restrict PowerShell Execution

windows

Implement PowerShell execution policies to limit script execution

Set-ExecutionPolicy -ExecutionPolicy Restricted -Scope LocalMachine

Remove Unnecessary Privileges

windows

Modify agent service account to run with minimal required privileges

sc.exe config "FortiSIEMAgent" obj= "NT AUTHORITY\LocalService"

🧯 If You Can't Patch

  • Implement strict PowerShell execution policies and logging
  • Network segment FortiSIEM agents and monitor for unusual PowerShell activity

🔍 How to Verify

Check if Vulnerable:

Check FortiSIEM agent version in Windows Services or via agent configuration files

Check Version:

Get-WmiObject Win32_Service | Where-Object {$_.Name -like '*FortiSIEM*'} | Select-Object Name, DisplayName, PathName

Verify Fix Applied:

Verify agent version shows 4.1.5 or later and test PowerShell execution restrictions

📡 Detection & Monitoring

Log Indicators:

  • Unusual PowerShell execution by FortiSIEM agent service account
  • Privilege escalation attempts in Windows Event Logs

Network Indicators:

  • Unexpected outbound connections from FortiSIEM agents
  • Anomalous PowerShell network activity

SIEM Query:

source="Windows Security" EventID=4688 ProcessName="powershell.exe" SubjectUserName="FortiSIEMAgent"

🔗 References

📤 Share & Export