Windows Remote Desktop Services Remote Code Execution Vulnerability (CVE-2025-21309)
A race condition in Windows Remote Desktop Services can lead to a use-after-free, which an attacker could exploit to execute arbitrary code. The attacker must connect to a system with the Remote Desktop Gateway role and win the race condition.
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.
Windows Remote Desktop Services
Windows Remote Desktop Services
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 Remote Desktop Services that leads to a use-after-free memory corruption.
Impact
An attacker could execute arbitrary code on the target system, but exploitation requires winning a race condition, which is difficult.
What the attacker needed
Target runs Remote Desktop Gateway role; attacker can connect to the target; win a race condition
How it was found
- Connect to a system with the Remote Desktop Gateway role.
- Trigger the race condition to create a use-after-free.
- 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.
A race condition is when two actions happen at nearly the same time and the program handles them in the wrong order. A use-after-free is when the program frees memory but then keeps using it, which can let an attacker take control. Here, an attacker who connects to a Remote Desktop Gateway at just the right moment could run their own code on the system.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.