Windows Remote Desktop Services Remote Code Execution Vulnerability (CVE-2025-27482)
The Remote Desktop Gateway Service stores sensitive data in improperly locked memory, allowing an unauthenticated attacker to trigger a race condition that creates a use-after-free and execute arbitrary code over the network.
Description
Sensitive data storage in improperly locked memory in Remote Desktop Gateway Service allows an unauthorized attacker to execute code over a network.
FAQ
According to the CVSS metric, the attack complexity is high (AC:H). What does that mean for this vulnerability? Successful exploitation of this vulnerability requires an attacker to win a race condition.
FAQ
How could an attacker exploit this vulnerability? An attacker could successfully exploit this vulnerability by attempting to connect to a system with the Remote Desktop Gateway role, triggering the race condition to create a use-after-free scenario, and then leveraging this to execute arbitrary code.
Remote Desktop Gateway Service
Remote Desktop Gateway Service
Microsoft
Microsoft
Customer Action Required
Yes
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a race condition in the Remote Desktop Gateway Service leads to a use-after-free because sensitive data is stored in improperly locked memory.
Impact
An unauthenticated attacker could execute arbitrary code over the network, but exploitation requires winning a race condition.
What the attacker needed
Target runs Remote Desktop Gateway; network access to the service; win a race condition
How it was found
- Connect to a system that has the Remote Desktop Gateway role.
- Trigger the race condition to create a use-after-free scenario.
- Leverage the use-after-free to execute arbitrary code.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a flaw in a Windows service that lets people connect to remote desktops. Because the service does not protect some memory properly, an attacker can send network traffic that causes a timing problem (a race condition) and then run their own code on the machine. No login is needed to try this.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.