CVE-2021-37595

9.8 CRITICAL

📋 TL;DR

This vulnerability in FreeRDP's Windows client allows remote code execution through improper input validation in clipboard file content requests. Attackers can exploit missing checks in the FILECONTENTS_RANGE PDU handler to execute arbitrary code on vulnerable systems. All Windows users running FreeRDP versions before 2.4.0 are affected.

💻 Affected Systems

Products:
  • FreeRDP
Versions: All versions before 2.4.0
Operating Systems: Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects the Windows client implementation of FreeRDP. The vulnerability is in the clipboard redirection feature which is commonly enabled by default.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with remote code execution leading to complete control of the affected system, data exfiltration, and lateral movement within the network.

🟠

Likely Case

Remote code execution allowing attackers to install malware, create backdoors, or steal sensitive information from the compromised system.

🟢

If Mitigated

Denial of service or limited information disclosure if exploit attempts are blocked by network controls or security software.

🌐 Internet-Facing: HIGH - FreeRDP clients often connect to remote systems, making them potentially exposed to internet-based attacks.
🏢 Internal Only: HIGH - Even internal-only RDP connections can be exploited if an attacker gains internal network access.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability requires the attacker to send a malicious FILECONTENTS_RANGE PDU, which can be done without authentication if the client connects to a malicious server.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.4.0 and later

Vendor Advisory: https://github.com/FreeRDP/FreeRDP/security/advisories

Restart Required: Yes

Instructions:

1. Download FreeRDP 2.4.0 or later from the official repository. 2. Uninstall the vulnerable version. 3. Install the patched version. 4. Restart the system to ensure all components are updated.

🔧 Temporary Workarounds

Disable Clipboard Redirection

all

Disable clipboard redirection feature which is required for exploitation

freerdp /clipboard:off
xfreerdp /clipboard:off

Network Segmentation

all

Restrict RDP connections to trusted networks only

🧯 If You Can't Patch

  • Implement strict network controls to limit RDP connections to trusted sources only
  • Deploy endpoint protection that can detect and block RDP-based exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check FreeRDP version with: freerdp --version or wfreerdp.exe --version. If version is below 2.4.0, the system is vulnerable.

Check Version:

freerdp --version

Verify Fix Applied:

After updating, verify version is 2.4.0 or higher using the same command. Test clipboard functionality to ensure it still works properly.

📡 Detection & Monitoring

Log Indicators:

  • Unusual RDP connection patterns
  • Multiple failed clipboard operations
  • Process creation from RDP client processes

Network Indicators:

  • Unusual FILECONTENTS_RANGE PDUs in RDP traffic
  • RDP connections to/from untrusted sources

SIEM Query:

source="rdp_logs" AND (event_type="clipboard_operation" AND result="failed") OR (process_name="mstsc.exe" OR "freerdp" AND parent_process="explorer.exe")

🔗 References

📤 Share & Export