CVE-2024-38131 Overview
CVE-2024-38131 is a Remote Code Execution (RCE) vulnerability affecting the Clipboard Virtual Channel Extension in Microsoft Remote Desktop Client and multiple versions of Windows operating systems. This vulnerability allows a remote attacker to execute arbitrary code on target systems by exploiting weaknesses in how clipboard data is processed during Remote Desktop Protocol (RDP) sessions.
The Clipboard Virtual Channel Extension facilitates clipboard sharing between local and remote systems during RDP connections. When an attacker can induce a user to connect to a malicious RDP server, they can exploit this vulnerability to achieve code execution with the privileges of the connecting user.
Critical Impact
This vulnerability enables remote code execution through a network-based attack vector, requiring only user interaction to connect to a malicious server. Successful exploitation could result in complete compromise of confidentiality, integrity, and availability on the affected system.
Affected Products
- Microsoft Remote Desktop Client for Windows
- Microsoft Windows 10 (versions 1507, 1607, 1809, 21H2, 22H2)
- Microsoft Windows 11 (versions 21H2, 22H2, 23H2, 24H2)
- Microsoft Windows Server 2008 (SP2 and R2 SP1)
- Microsoft Windows Server 2012 (including R2)
- Microsoft Windows Server 2016
- Microsoft Windows Server 2019
- Microsoft Windows Server 2022 (including 23H2)
Discovery Timeline
- August 13, 2024 - CVE-2024-38131 published to NVD
- July 7, 2025 - Last updated in NVD database
Technical Details for CVE-2024-38131
Vulnerability Analysis
This vulnerability resides within the Clipboard Virtual Channel Extension component, which is responsible for synchronizing clipboard content between local and remote systems during RDP sessions. The weakness is classified under CWE-591 (Sensitive Data Storage in Improperly Locked Memory), indicating issues with how sensitive data or memory structures are handled during clipboard operations.
The vulnerability requires user interaction—specifically, a user must initiate an RDP connection to a malicious server controlled by an attacker. Once connected, the attacker can craft malicious clipboard data that, when processed by the vulnerable component, leads to arbitrary code execution on the client system. The attack succeeds without requiring any authentication from the attacker's perspective.
Root Cause
The root cause stems from improper handling of memory during clipboard data processing in the Virtual Channel Extension. When clipboard content is transferred between the remote server and the local client, insufficient validation or improper memory locking allows an attacker to manipulate memory in ways that lead to code execution. The CWE-591 classification suggests that sensitive data stored in memory may not be properly protected, enabling exploitation through crafted clipboard payloads.
Attack Vector
The attack is network-based and follows this general exploitation pattern:
- The attacker sets up a malicious RDP server configured to exploit the clipboard vulnerability
- The attacker uses social engineering to convince a victim to connect to the malicious server (e.g., phishing emails with RDP connection files, compromised legitimate servers)
- When the victim establishes an RDP connection, the malicious server sends specially crafted clipboard data
- The vulnerable Clipboard Virtual Channel Extension processes this data improperly
- This processing flaw allows the attacker to achieve arbitrary code execution with the victim's privileges
The vulnerability does not require prior authentication by the attacker and can be triggered through user interaction alone. The impact affects confidentiality, integrity, and availability of the compromised system.
Detection Methods for CVE-2024-38131
Indicators of Compromise
- Unexpected RDP connections to unfamiliar or suspicious external IP addresses
- Anomalous process spawning from mstsc.exe (Remote Desktop Client) or related RDP processes
- Unusual clipboard-related activity or memory access patterns in RDP client processes
- Presence of .rdp files directing users to unknown or suspicious servers
Detection Strategies
- Monitor for unusual outbound RDP connections, particularly to external IP addresses not previously seen in network traffic
- Implement application-level monitoring on mstsc.exe and related RDP client processes to detect anomalous behavior such as unexpected child processes or memory operations
- Deploy email security controls to detect and block phishing attempts containing .rdp files or links to malicious RDP servers
- Utilize EDR solutions to monitor for exploitation indicators in clipboard-related system calls
Monitoring Recommendations
- Enable enhanced logging for Remote Desktop connections including destination IPs and connection metadata
- Configure SIEM rules to alert on RDP connections to IP addresses outside of known/trusted ranges
- Monitor endpoint telemetry for process anomalies originating from the Remote Desktop Client
- Review security logs for failed or suspicious RDP authentication patterns that may indicate reconnaissance
How to Mitigate CVE-2024-38131
Immediate Actions Required
- Apply the security updates released by Microsoft for all affected products immediately
- Review and restrict RDP client usage to trusted servers only through Group Policy or firewall rules
- Educate users about the risks of connecting to untrusted RDP servers, particularly when prompted via email or web links
- Consider disabling clipboard redirection in RDP configurations where it is not required
Patch Information
Microsoft has released security updates addressing CVE-2024-38131. The official security advisory and patches are available through the Microsoft Security Update Guide. Organizations should prioritize applying these updates across all affected Windows client and server systems, as well as the Remote Desktop Client application.
Apply updates through Windows Update, WSUS, or your organization's patch management solution. Verify that updates are successfully installed by checking the installed update history on each system.
Workarounds
- Disable clipboard redirection for RDP connections via Group Policy: navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Device and Resource Redirection and enable "Do not allow Clipboard redirection"
- Restrict outbound RDP connections at the network perimeter to only approved internal systems or trusted external partners
- Block .rdp file attachments at the email gateway to prevent phishing-based delivery of malicious connection files
- Implement application control policies to restrict which users or systems can launch the Remote Desktop Client
# Group Policy configuration to disable clipboard redirection
# Path: Computer Configuration > Administrative Templates > Windows Components >
# Remote Desktop Services > Remote Desktop Session Host >
# Device and Resource Redirection
# Setting: Do not allow Clipboard redirection = Enabled
# Alternative: Registry-based mitigation
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fDisableClip /t REG_DWORD /d 1 /f
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


