CVE-2021-41031

7.8 HIGH

📋 TL;DR

A local privilege escalation vulnerability in FortiClient for Windows allows unprivileged local attackers to gain SYSTEM-level privileges by exploiting a relative path traversal flaw in the FortiESNAC service's named pipe. This affects FortiClient for Windows versions 7.0.2 and earlier, 6.4.6 and earlier, and 6.2.9 and below. Attackers must already have local access to the system to exploit this vulnerability.

💻 Affected Systems

Products:
  • FortiClient for Windows
Versions: 7.0.2 and earlier, 6.4.6 and earlier, 6.2.9 and below
Operating Systems: Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Windows versions of FortiClient. Requires local access to exploit.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local attacker gains full SYSTEM privileges, enabling complete system compromise, installation of persistent malware, credential theft, and lateral movement within the network.

🟠

Likely Case

Local attacker escalates privileges to SYSTEM, allowing them to bypass security controls, install additional tools, and access sensitive system resources.

🟢

If Mitigated

With proper access controls and monitoring, exploitation attempts can be detected and contained before significant damage occurs.

🌐 Internet-Facing: LOW - This is a local privilege escalation requiring attacker to already have local access to the system.
🏢 Internal Only: HIGH - Any compromised user account or malicious insider with local access could exploit this to gain SYSTEM privileges.

🎯 Exploit Status

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

Exploitation requires local access but is relatively straightforward once access is obtained. Named pipe vulnerabilities are commonly weaponized.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FortiClient 7.0.3, 6.4.7, 6.2.10 and later

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

Restart Required: Yes

Instructions:

1. Download latest FortiClient version from Fortinet support portal. 2. Uninstall current vulnerable version. 3. Install patched version. 4. Restart system to ensure all services are updated.

🔧 Temporary Workarounds

Restrict Named Pipe Access

windows

Configure Windows security policies to restrict access to the FortiESNAC named pipe to only necessary users and processes.

sc stop FortiESNAC
sc config FortiESNAC start= disabled

Disable FortiESNAC Service

windows

Temporarily disable the vulnerable FortiESNAC service if not required for functionality.

sc stop FortiESNAC
sc config FortiESNAC start= disabled

🧯 If You Can't Patch

  • Implement strict least privilege access controls to limit local user access
  • Monitor for suspicious named pipe access attempts and privilege escalation activities

🔍 How to Verify

Check if Vulnerable:

Check FortiClient version in About dialog or via 'wmic product get name,version' command and compare with affected versions.

Check Version:

wmic product where "name like '%FortiClient%'" get name,version

Verify Fix Applied:

Verify FortiClient version is 7.0.3+, 6.4.7+, or 6.2.10+ and check that FortiESNAC service is running with proper permissions.

📡 Detection & Monitoring

Log Indicators:

  • Unusual named pipe access attempts to FortiESNAC
  • Privilege escalation events in Windows Security logs
  • Unexpected SYSTEM-level process creation from user accounts

Network Indicators:

  • Local named pipe communication anomalies
  • Unexpected inter-process communication patterns

SIEM Query:

EventID=4688 AND NewProcessName LIKE '%cmd.exe%' OR '%powershell.exe%' AND SubjectUserName!=SYSTEM AND TokenElevationType=%%1938

🔗 References

📤 Share & Export