CVE-2025-59202 Overview
CVE-2025-59202 is a use-after-free vulnerability [CWE-416] in Windows Remote Desktop Services. An authorized local attacker can exploit the flaw to elevate privileges on the affected host. Microsoft published the advisory on October 14, 2025 and rated the issue High severity.
The vulnerability affects a broad range of Windows client and server versions, including Windows 10, Windows 11, and Windows Server releases from 2012 through 2025. Exploitation requires local access and low-level privileges, and the attack complexity is high because the attacker must win a specific memory-state race in the Remote Desktop Services process.
Critical Impact
Successful exploitation grants attackers full control (high confidentiality, integrity, and availability impact) over the compromised host, enabling lateral movement across enterprise Remote Desktop Services deployments.
Affected Products
- Microsoft Windows 10 (1607, 1809, 21H2, 22H2)
- Microsoft Windows 11 (22H2, 23H2, 24H2, 25H2)
- Microsoft Windows Server 2012, 2016, 2019, 2022, 2022 23H2, and 2025
Discovery Timeline
- 2025-10-14 - CVE CVE-2025-59202 published to NVD and Microsoft releases security update
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-59202
Vulnerability Analysis
The flaw resides in Windows Remote Desktop Services, the platform component that brokers RDP sessions and manages session state on both client and server SKUs. A use-after-free condition occurs when the service references a memory object after it has already been freed. An authorized local attacker interacting with the service can influence allocation and free operations to trigger the reuse.
Exploitation yields local privilege escalation. Because Remote Desktop Services runs with elevated privileges, controlled reuse of freed memory can be leveraged to hijack execution flow and run attacker-supplied code in a higher-privileged context.
Root Cause
The root cause is improper lifetime management of a heap-allocated object inside Remote Desktop Services. The service retains a dangling pointer to an object after that object is released. Subsequent operations that dereference the stale pointer read or write memory that an attacker has since reclaimed and populated with controlled data.
Attack Vector
The attack vector is local. The attacker must already hold valid credentials on the target and interact with Remote Desktop Services to drive the vulnerable code path. Attack complexity is high, indicating the attacker must reliably win a race condition or arrange a specific heap layout before triggering the free-and-reuse sequence. No user interaction is required. Refer to the Microsoft Security Update Guide for authoritative technical details.
Detection Methods for CVE-2025-59202
Indicators of Compromise
- Unexpected crashes or restarts of TermService or related Remote Desktop Services processes, including Windows Error Reporting entries citing access violations.
- New or unexpected child processes spawned by svchost.exe hosting the Remote Desktop Services group.
- Local user accounts performing sudden privileged operations shortly after RDP session activity.
Detection Strategies
- Monitor Windows Event Log channels Microsoft-Windows-TerminalServices-LocalSessionManager/Operational and Application for crash events tied to Remote Desktop Services binaries.
- Correlate local logon events (Event ID 4624 with LogonType 2 or 10) with subsequent token elevation events (Event ID 4672) originating from non-administrative accounts.
- Alert on process-integrity transitions where a medium-integrity user process is followed by a SYSTEM-integrity child under the Remote Desktop Services process tree.
Monitoring Recommendations
- Enable command-line and process-creation auditing (Event ID 4688) on all hosts exposing Remote Desktop Services.
- Track anomalous heap or memory access patterns in svchost.exe -k termsvcs using EDR telemetry.
- Baseline authorized RDP administrators and flag deviations, particularly on servers running Windows Server 2016 through 2025.
How to Mitigate CVE-2025-59202
Immediate Actions Required
- Apply the October 2025 Microsoft security updates referenced in the Microsoft Security Update Guide to all affected Windows client and server systems.
- Prioritize patching internet-adjacent Remote Desktop Session Hosts and jump servers where the attacker footprint is highest.
- Audit local accounts on RDS hosts and remove unnecessary interactive logon rights.
Patch Information
Microsoft released fixes on October 14, 2025 as part of the monthly security update cycle. Administrators should deploy the cumulative update corresponding to each affected Windows build. Refer to the Microsoft Security Update Guide for KB article numbers per platform.
Workarounds
- Restrict access to Remote Desktop Services using Network Level Authentication (NLA) and enforce strong authentication for all RDP-enabled hosts.
- Limit which local and domain accounts hold the Remote Desktop Users role, and disable the service on hosts that do not require it.
- Segment RDS infrastructure behind an RD Gateway and restrict inbound RDP with host-based firewall rules until patches are deployed.
# Example: disable Remote Desktop Services on hosts that do not require it
sc.exe config TermService start= disabled
sc.exe stop TermService
# Example: restrict RDP access via Windows Firewall to a management subnet
netsh advfirewall firewall set rule group="Remote Desktop" new enable=Yes
netsh advfirewall firewall add rule name="Restrict RDP" dir=in action=block protocol=TCP localport=3389 remoteip=any
netsh advfirewall firewall add rule name="Allow RDP Mgmt" dir=in action=allow protocol=TCP localport=3389 remoteip=10.0.0.0/24
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

