CVE-2021-31854

7.7 HIGH

📋 TL;DR

This CVE describes a local command injection vulnerability in McAfee Agent for Windows that allows authenticated local users to execute arbitrary code by placing malicious files in specific folders. Successful exploitation could lead to privilege escalation and full system compromise. Only Windows systems running vulnerable McAfee Agent versions are affected.

💻 Affected Systems

Products:
  • McAfee Agent (MA) for Windows
Versions: All versions prior to 5.7.5
Operating Systems: Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Requires local user access to place malicious files in relevant folders and trigger the deployment feature.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attacker gains SYSTEM/root privileges, installs persistent backdoors, exfiltrates sensitive data, and moves laterally across the network.

🟠

Likely Case

Local authenticated attacker escalates privileges to SYSTEM level, potentially installing malware or accessing protected system resources.

🟢

If Mitigated

With proper access controls and monitoring, exploitation attempts are detected and blocked before significant damage occurs.

🌐 Internet-Facing: LOW - This is a local privilege escalation vulnerability requiring local access to the system.
🏢 Internal Only: HIGH - Any compromised user account on a vulnerable system could lead to full system compromise and lateral movement.

🎯 Exploit Status

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

Exploitation requires local authenticated access and knowledge of the McAfee Agent deployment feature.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.7.5 or later

Vendor Advisory: https://kc.mcafee.com/corporate/index?page=content&id=SB10378

Restart Required: Yes

Instructions:

1. Download McAfee Agent 5.7.5 or later from official McAfee sources. 2. Deploy the update through your management console or manually install. 3. Restart affected systems to complete the update.

🔧 Temporary Workarounds

Restrict file permissions

windows

Limit write access to McAfee Agent directories to prevent malicious file placement

icacls "C:\Program Files\McAfee\Agent\" /deny Users:(OI)(CI)W

Disable deployment feature

windows

Temporarily disable the System Tree deployment feature if not required

Disable via McAfee ePolicy Orchestrator console or local configuration

🧯 If You Can't Patch

  • Implement strict access controls to limit who can write to McAfee Agent directories
  • Enable detailed auditing and monitoring of file creation in McAfee Agent folders

🔍 How to Verify

Check if Vulnerable:

Check McAfee Agent version: Open McAfee Agent UI or check registry at HKLM\SOFTWARE\McAfee\Agent\CurrentVersion

Check Version:

reg query "HKLM\SOFTWARE\McAfee\Agent" /v CurrentVersion

Verify Fix Applied:

Verify version is 5.7.5 or higher and check that the vulnerability is listed as fixed in the patch notes

📡 Detection & Monitoring

Log Indicators:

  • Unexpected file creation in McAfee Agent directories
  • Suspicious process execution from McAfee folders
  • Failed attempts to write to protected directories

Network Indicators:

  • Outbound connections from McAfee Agent processes to unexpected destinations
  • Reverse shell connections originating from systems with McAfee Agent

SIEM Query:

Process Creation where (Image contains 'cleanup.exe' OR ParentImage contains 'McAfee') AND CommandLine contains suspicious patterns

🔗 References

📤 Share & Export